Monitors often have an ability to turn the screen around, even back to front. I think it's purpose is for being able to fix monitors upside down, perhaps on a ceiling. Some will swivel sideways as well, so you can look at them in portrait fashion and as such display a complete sheet of A4, useful for typists.
Also useful for pranksters in the office.
But I digress...
These features are often accessible through a hot-key combination. CTRL+F3 or something. It sounds like you've stumbled across the key combination. Tell us what monitor make and model you have and we might be able to tell you the combinations, perhaps even help you disable it all together.