Taking the poster at his/her word that it is curiosity and that he/she is genuinely asking:
It may not be true for smaller venues, but Broadway theaters are big enough that I imagine that all of them have alternate exits, for fire code if nothing else. For example, the ways the audience uses to go in and out of the theater could be used as alternate exits. Some theaters are connected to neighboring buildings, sometimes through underground tunnels. And I imagine that Broadway theaters generally have loading docks, which would also potentially be alternate exits.
So actors have other ways of leaving, for the most part. And hopefully the audience respects their decision to leave through an alternate exit.
"What was the name of that cheese that I like?"
"you can't run away forever...but there's nothing wrong with getting a good head start"
"well I hope and I pray, that maybe someday, you'll walk in the room with my heart"