The engine that won't die.
Cars equipped with carburetors can suffer "dieseling" or "run-on". This is more common when using unleaded fuel, but can happen with leaded fuel as well. Dieseling is when after the ignition is shut off (causing the spark plugs stop firing), the engine continues to try to run. Perhaps you're familiar with the symptom- you turn off the engine and it starts coughing, bucking and clanking, sometimes for up to 30 seconds. Aside from being embarrassing, repeated occurrences of dieseling can actually damage your engine.
What causes dieseling?
When the ignition is turned off, the spark plugs quit firing. Normally this "kills" the engine within a couple of revolutions, however if the butterfly valves on the carburetor that control the amount of air entering the engine don't close completely, the engine can still suck in air as the engine spins down. Since carburetors (unlike fuel injectors) don't shut off the fuel supply when the ignition is turned off, the air being drawn into the engine brings fuel with it. When the fuel/air mixture is compressed in the cylinder, it heats up and can spontaneously ignite, even without a spark from the spark plug to ignite it. This causes the engine to continue to try to run, leading to the clanking and coughing that is called dieseling.
Why don't the butterfly valves close completely?
In order for the engine to idle, the butterfly valves must be slightly open even when your foot is off the gas. If they closed completely, all air would be shut off from the engine, and every time you took your foot off the gas the engine would stop running (even with the ignition on).
How does an idle stop solenoid help with this?
An idle stop solenoid is an electrical device that, when energized (by the ignition being turned on) causes a pin or plunger to pop out slightly. This pin comes in contact with the throttle linkage and causes the butterfly valves in the carburetor to move to the idle position. When the ignition is turned off, the pin retracts enabling the butterfly valves to fully close, preventing air from being drawn into the engine and preventing dieseling. Most carbureted cars built after the advent of unleaded fuel are equipped with idle stop solenoids for this exact reason.
How do I know if I need to replace my idle stop solenoid?
If your car has a carbureted (not fuel injected) engine, and after you shut off the ignition it still coughs and splutters and tries to run, chances are you need a new idle stop solenoid. Replacing the idle stop solenoid (and adjusting the idle with the solenoid's pin or plunger) will correct this behavior in nearly all cases.