It the pilot unit is working properly, the pilot should remain lit at all times. It it goes out often or it won't stay lit, you most likely need a new thermocouple.
Whether the pilot stays lit or not depends on the unit you are using it on. If you can provide the manufacturer, model and serial number of your unit I can do my best to get you the pilot information.