As gasoline burns, it expands. When an engine is operating smoothly and efficiently, the space above the piston will expand at roughly the same speed as the burning gasoline inside. If that happens, the force on the piston will be relatively constant throughout the stroke.
If an engine is rotating more slowly, the much of the fuel will burn before the piston has had a chance to move down very far. This will cause the force on the piston to be much greater near the top of the stroke than nearer the bottom; if the amount of fuel-air mixture in the cylinder is small, however, as when the engine is idling, that isn't a particular problem since the peak force would still be less than when the engine is operating wide-open throttle at speed.
Two related bad things can happen, though, if the engine is operated at low speed without being throttled back. First of all, fuel will burn more quickly at higher pressures; if the engine is running at speed, pressures will be limited because the piston will be moving down as the fuel is burning. If the piston doesn't move down fast enough, however, then not only will the pressure will increase beyond intended levels, but the increased pressure will cause the fuel to burn faster, thus hastening further pressure increase. This is a qualitative effect; either the expansion will be fast enough to limit the rate of combustion, or it won't.
The second thing that can happen is that the an excessive portion of the force from the piston can be transferred into pushing on the engine bearings rather than turning the car. If a crank is at 90 degrees, all of its force will get converted into torque; at 0 or 180 degrees, none of it will get get converted into torque. At intermediate angles, varying amounts will get converted into torque. Ideally, much of the combustion should take place while the crank is significantly beyond the zero-degree mark. If the fuel ignites too quickly, however, that may not be the case. Knocking thus causes a double-whammy of excessive force from the piston, provided at a time when the crank can't use it very effectively. Indeed, because some engines ignite fuel just before the crank hits top-dead center, that peak force could in extreme cases apply torque in reverse. It's unlikely that it could actually make the engine rotate backwards, but applying torque in the wrong direction would stress many components in the engine while failing to do useful work.