We've all taken images that aren't level, but of course, the problem is that if the composition is too tight, you may not be able to rotate the photo back to neutral without cutting off part of the subject or some other important bit. This helpful tutorial will show you what you can do in that situation.
Coming to you from Unmesh Dinda of PiXimperfect, this great video will show you how to take advantage of the Content-Aware Crop tool in Photoshop and how you can easily get the same results if you're using an earlier version of the program. When you rotate an image but maintain the crop, you'll often lose parts of it along the edges, which traditionally means cropping in further until it is entirely contained within the image again. However, this can dramatically alter the composition of the photo by changing the relative position of subject(s) within the frame. This is where Content-Aware Crop comes to the rescue. It can automatically fill in the missing areas, allow you to rotate an image or change its aspect ratio with more freedom. Of course, as you'll see, it's not magic, and it'll have trouble with more difficult things like human body parts, but for things like a landscape background or the sky, it can be exactly what you need.