Overheating can be caused by anything that decreases the cooling system's ability to absorb, transport and dissipate heat: A low coolant level, a coolant leak (through internal or external leaks), poor heat conductivity inside the engine because of accumulated deposits in the water jackets, a defective thermostat that doesn't open, poor airflow through the radiator, a slipping fan clutch, an inoperative electric cooling fan, a collapsed lower radiator hose, an eroded or loose water pump impeller, or even a defective radiator cap.
One of nature's basic laws says that heat always flows from an area of higher temperature to an area of lesser temperature, never the other way around. The only way to cool hot metal, therefore, is to keep it in constant contact with a cooler liquid. And the only way to do that is to keep the coolant in constant circulation. As soon as the circulation stops, either because of a problem with the water pump, thermostat or loss of coolant, engine temperatures begin to rise and the engine starts to overheat.
The coolant also has to get rid of the heat it soaks up inside the engine. If the radiator is clogged with bugs and debris, or if its internal passages are blocked with sediment, rust or gunk, the cooling efficiency will be reduced and the engine will run hot. The same thing will happen if the cooling fan is not engaging or spinning fast enough to pull air through the radiator.
The thermostat must be doing its job to keep the engine's average temperature within the normal range so the engine does not overheat. If the thermostat fails to open, it will effectively block the flow of coolant and the engine will overheat.
Exhaust restrictions can also cause the engine to overheat. The exhaust carries a lot of heat away from the engine, so if the catalytic converter is restricted, or a pipe has been crimped or crushed, exhasut flow can be restrricted causing heat to build up inside the engine.
It's also possible that your engine really isn't overheating at all. Your temperature gauge or warning lamp might be coming on because of a faulty coolant sensor. Sometimes this can be caused by a low coolant level or air trapped under the sensor.