If you end up trapped, cover the cracks around the door with whatever you can find: blankets, jackets, towels, etc. If you can wet the fabric down, do so. Cover vents with wet blankets as well, to keep smoke from seeping into the room, and call 911 if you have access to a phone.
In the event that you get stuck on an upper story of a building, hang sheets or anything large enough to capture people’s attention out the window to let firefighters know where you are. Do not attempt to make your way through the fire.
If your clothes catch on fire, you should immediately stop, drop, and roll: stop where you are, drop to the ground, and roll to extinguish the flames. Cover your face with your hands as you roll, as well, to further protect yourself from flames.