So you're right, (most) reactors require coolant to be actively injected after shutdown to deal with residual heat in the reactor plus the decay heat of various fission daughter products. To cope with this, most plants are simply hooked into the electrical grid and use that to drive pumps to keep water moving through the reactor. In case there's a coincident reactor shutdown and loss of the electrical grid, plants have two redundant backup generators that can run the pumps (plus a few other key systems) for 24 hours (in the US at least), plus an 8-hour battery backup in case both generators fail to start.
Decay heat is highest right after shutdown, it falls off in an exponential fashion such that the danger of meltdown passes after a certain amount of time (hard to say exactly what that is, depends on how spent the fuel is, what the cladding materials are, etc.). Residual heat is also highest right after shutdown (residual heat is the result of the reactor operating at rated power, the materials in the core are at a higher temperature when making power than they are otherwise).
The experiment at Chernobyl was an attempt to use the decay and residual heats to keep making steam after shutdown, presumably to see how long they could keep their coolant injection pumps running in case of a loss of the electrical grid and their backup generators failing to start. It's not a bad idea. Had it worked, it would've given the facility a fair amount of additional flexibility post-shutdown.
Due to some circumstances beyond their control, the facility operators had their reactor in a difficult reactivity condition (I can explain this too, if people are curious) that, when combined some of the unfortunate reactivity features of that particular reactor type, caused the excursion that destroyed the reactor. They'd also disabled some safety systems as well, which was a poor decision, to say the least.