There are many reasons that you can have these symptoms:
-You could have a blocked/partially blocked chimney of flue. Automatic dampers will disallow a furnace from firing if their is a blockage
-You can have a faulty spill switch. A spill switch senses the presence of CO (carbon monoxide) and other noxious gases and shuts down the system in their presence. If the awitch is faulty (common) the unit will switch off with no hope of refiring until the spill switch is removed/replaced.
-'Roll Out' switch. A flame roll out switch will shut down the unit if the flame 'rolls out' of its housing. Some roll out switches are designed with push button reset.
-Thermocouple. Thermocouple provides electical energy to the gas valve in the presence of a pilot flame. If the thermocouple fails or the pilot light goes out, no current no heat.
-Bad pilot tube. A pilot tube can burn away with time disallowing the flame from firing properly.