Rotate by an arbitrary amount works with the ruler tool.
This is designed to fix a photo like a car that was shot at an angle and it looks like it's going uphill. You might also want to use it for a sunset photo at the beach where the horizon is not level.
The ruler tool resides in the eyedropper group. Bring up your photo and click on the ruler. Now click it and draw a line on something in the photo which should be level like a house roof, or a step, or a horizon.
Once you have the line on your image from the ruler, go to Image, Rotate and go to Arbitrary. Now this should be showing you how much you have to rotate the image clockwise, or counterclockwise to get it level. All you have to do is click on the one that is highlighted and photoshop will turn the image for you.
The reason it's called arbitrary is you can guess (if there is nothing level in the shot) that say 3 or4 degrees should fix this. You just type in the amount in the Clockwise or the CC and click it. If you gave it too much, or not enough you can go back and change it.
Now all you have to do is use the crop tool, or the Rectangular tool to square off your photo and you're done.
I hope this helps.
Some tutorials that may help you