Use the back of your hand and touch the door. If the door is hot, don't open it. Use another way out. If the door is cool, open it slowly to see if smoke or fire is on the other side. Have smoke detectors in your house and make sure that they work.
Smoke detectors can smell smoke.
They will make a loud noise and wake you up when you are sleeping. You need to change the batteries in your smoke detector twice a year. It is usually a good idea to change the batteries when your parents change the clocks in the Spring and Fall. If you live in a two-story house, you need to have one on each floor. Plan your escape route before you have a fire.