You can try to not rotate with the earth. Go drive a car, plane, bike, or even go swimming. When you do that, you are not rotating along with the earth, but slightly faster or slower (depending which way you're going). You'll notice that this always takes energy. The faster you go, the more energy it takes. And if you stop inputting energy, friction will bring you back to the speed of the earth. Jump out of a moving car if you don't believe me! (don't really do that though :) )
This works the same way with the atmosphere. A jet liner requires a constant input of tens of thousands of horsepower to move at a different speed than the air around it...it goes to reason that if you keep a jet liner still but move the air over it, you need at least the same power input. Now imagine this effect, but working over the entire surface of the earth. The tendency is always for everything to go the same speed as the earth. The larger the difference, the stronger this tendency. Friction is no small matter, even with air.
Inertia also does its part to even things out, but if it was just inertia at play than the car who's driver dies will keep on driving. The wind will keep on blowing. The river will keep on flowing. The landslide will keep on sliding. Eventually things would be just flying around every which way at every possible speed. Of course inertia is the reason the Earth itself is rotating at the particular speed that it's rotating...which in turn drags everything along with it.
Naturally gravity has it's role as there'd be no friction (and indeed, no earth) if not for gravity holding everything together.
So, in simplest terms, the answer is friction, inertia, and gravity.