If you notice a leak in one or more of your hoses, a few turns of electrical tape which can be in your toolbox, overlapped can get you enough time to get to a gas station. If you cannot get the problem solved due to lack of parts, you can drive say fro a couple of minutes, stop and let the engine cool and drive again till you can either get home or to the nearest mechanic. Towing would be the best option if you have access to it. For cars with an in-line engine (the engine is parallel with respect to the wheels) there might be a belt that has either slipped or disintegrated preventing the cooling fan from turning. A piece of rope or twine can become a temporary solution as long as you tie it down tightly allowing you to get to help(keep the engine revolutions to a minimal or you could send the temporary belt slamming into something which can make a bad situation worse).
These tips can be used to help you get to a safe place to get your engine fixed as soon as possible and are only meant to allow driving for such. Get the car fixed as soon as possible for this can be sure sign of a failure within the engine’s cooling system that can ultimately shorten it’s life sending it faster to the recycling center. This problem can be avoided with proper maintenance and inspection which can be done at each check-up, but as everybody knows it, the unexpected is what we all have to prepare for and engine overheating is one that just happens to occur when you are in the most unlikely places out of reach of the nearest garage or tow truck. Drive safe, buckle up.