As a professional pilot, I spend four or five days a year in multimillion-dollar flight simulators being examined by specialized training pilots. Since professional pilots already know how to fly, much of the testing focuses on what are called "non-normal situations." Let's imagine you find yourself on an airplane, in the sky, without a pilot. You are in a non-normal situation.
A useful guide to your initial actions if you're in such a pickle is a simple mnemonic called ANC: Aviate, Navigate, Communicate. (Aviation is as acronym-laden a field as any I've come across.)
So, aviate. You need to keep the plane in the safe, stable flight you found it in.
Use the control wheel and the horizon displayed on the attitude indicator to level the wings. If it's gin-clear outside and the real horizon is obvious to you, feel free to use it.
Next, take a look at the altimeter and the vertical speed indicator. Pick an altitude as your target—a simple number near your current altitude, like 10,000 or 15,000 feet. If you're climbing away from your target, then very gently push the control column forward—that is, away from you—until you've stopped climbing. If you're descending, then pull the control column back, toward you, until you're not descending anymore. Be gentle, as it's easy to overcorrect. Porpoising, or repeatedly ascending above and then descending below your target altitude, is a common problem for new pilots.
Now look at the airspeed indicator. Pick a target speed toward the higher end of the safe range. It's impossible to give numbers for every airplane, but try 100 knots in a small plane, 250 knots in a small airliner, and 280 knots in something like a 747. If your speed is higher than your target, pull the throttles or thrust levers back slightly to reduce power. If it's lower, then add power.