You have a small amount of time to think and take steps to give yourself enough time to survive until rescue arrives. Close all doors between you and the fire. Tell them your address, that you are trapped inside a fire, and where in the structure you are located. Seal the bottom of the door between you and the fire with sheets, rags, rugs, or anything to prevent smoke from coming in. If you are still inside, remain as low to the floor as possible, as this is where deadly smoke and flames will go last.
Fire prevention is better than fire extinguishing.