In Windows, turning the desktop sideways is a feature that supports monitors with rotatable screens (with compatible graphics cards and display drivers). What probably happened is that you accidentally hit some key combinations, or your cat walked across the keyboard.
Hold Ctrl+Alt and then press the up arrow key. This will rotate it by 90 degrees until it is back where you want. The other arrow key Control+Alt combinations will rotate it in various directions.
XP: Or right-click on a blank spot of the Windows desktop, choose Properties: Settings
and click on the Advanced button. Look for a setting to change the rotation.
Alternatively, you can get to the display settings from Start Menu: Control Panel: Display: Settings
Windows 7 : Control Panels: Appearance and Personalization: Display Settings: Resolution
On Macintosh:
Open System Preferences from under the Apple menu
Hold down the Command+Option keys and click on the “Display†system preferences icon
At the right hand side of the Display prefs window, see the ‘Rotation’ drop down menu (if you don’t see it, it means it is not supported on your machine/monitor)
Choose the rotation you prefer
Close Display preferences