If you happen to notice your cars temperature gauge dipping into the red, the first thing you will want to do is pull over as soon as you safely can and shut off the engine. If the engine temperature is only mildly elevated then sometimes it may be enough to turn your heater on. Stop-and-go traffic is notorious for testing the limits of your cooling system. Continuing to drive when your engine overheats can have disastrous mechanical consequences resulting in some extreme repair bills if it is allowed to continue for too long.
Once you are safely stopped with the car engine shut off, you can assess if you are leaking any antifreeze. Whatever you do, keep yourself and others away from the hot engine or any steam or fluids that the car may be emitting. These things can easily burn or cause injury. If there is steam you can sometimes see the source which can help to pinpoint the cause of the overheating.
There can be many causes for a vehicle to overheat. The most common one is probably a coolant leak in one of the radiator hoses that has caused a significant enough amount of coolant to escape so that the system can no longer function as it should. But, it could be many things, such as a stuck thermostat, a bad water pump or a plugged/leaking radiator to name a few. If you have a more chronic overheating problem then it is likely more than a simple leak.
If the leak is not too severe you may be able to wait until after the engine has cooled to open up the radiator cap and top up the coolant to drive to an auto repair center while carefully monitoring the temperature. In more severe cases, you may need to call for roadside assistance and have the vehicle towed to a service station for further repairs.
When this sort of thing happens, it is never a good feeling and almost always happens at the least opportune time. Preventative maintenance of a vehicles cooling system is often overlooked, but a failure can leave you just as stranded as any flat tire, so it is important nonetheless. Be sure to keep an eye on the condition of the hoses and check your coolant level often. Keeping an eye on your coolant system can prevent a future overheating emergency.