Almost any non residential building has to be built to firecodes. A fire can't just start somewhere and consume the whole building. It literally takes time for the fire to move from place to place because of the way fireproofing is made and designed. Err, that is not to say residential buildings are meant to go up like matches. Houses would become astronomically more expensive if the level of fireproofing went in that would insure ultimate safety. But even then there are regulations. But sometimes you get places that are grandfathered in. There's no way to change this except for completely demolishing the house and starting over.
Most hotels have a central exit, as well as side exits. If they blocked off ANY exit, they will be punished severely (if someone calls them on it).
Also, most modern buildings are designed with the central shaft (most often elevator) updrafts heat and smoke all the way out of the building. This sucks in air on most (key word) floors. So if you stay at a window, you'll receive fresh oxygen.
Of course this is idealized, when does anything ever work out to plan?
The real problems with fires aren't the flames themselves, but the lack of oxygen. It's sort of like drowning, but on a very slow timescale. As the smoke goes on, you lose brain function. So the way to overcome this is to easily understand the exits. If you do this, you'll get out much easier.