They were running tests of the cooling systems and a flow control valve failed. There were supposed to be failsafe controls in place to re-fill the cooling rod chambers with water, but they didn't activate.
The rods became so hot they cracked the concrete casing of the reactor and the fire began to spread.
The graphite at the core turned into a big slag piles, and the smoke pored out through the top of the reactor. Anyone who stuck around to fight the fire was doomed, but many did anyway.
The smoke spread and blanketed everything that was already irradiated by rays with even more radioactive material.
By the time the publc knew what was going on thousands were already poisoned.