Why does your car shake when you turn it off?

Movements in your car's motor causes your car to move slightly from side to side. When the engine is running, the movements are so fast that the car is balanced - it doesn't have a chance to move to one side before the opposite force moves it back the other way. When you turn the engine off, these forces slow down and as the engine stops running the forces from side to side get slower until they actually move the car for a moment - and it shakes from one side to the other until the engine stops.