Keep your back to the exit and the fire in front of you - do not let the fire block your escape.
Make sure everyone is wearing a lifejacket.
If the fire is engine-related, do not open the engine compartment. Use the access port.
If you can, use a fire extinguisher and aim it at the base of the flames to control the fire. Sweep the discharge nozzle from side to side and for a few seconds after the flames are completely out.
If you are underway and can't put the lifejacket out, wear your lifejacket, issue a mayday call, activate an emergency beacon if you have one, use your flares and abandon your boat.
Always know where you are and be ready to describe your specific location.