I sometimes have teachers email me about this problem, so it makes sense to have a blog post that tells them what happened, and how to fix it.
It may have been by accident (at least the first time), but once kids learn this fun trick, they are apt to try it again. And you have to admit, it IS kind of funny!
To turn a screen sideways or upside down, push one of the arrow keys while keeping Ctrl and Alt held down. The left and right keys will rotate the screen 90 degrees, and the down key will flip the screen upside down.
To fix it, push the key that points in the direction that you want the top of the screen to point. This means that pushing Ctrl+Alt+Up will return the screen to normal.