Many, many times this has happened to me and I've seen it happen to so many others. You're just working away, doing something normal on your Mac, when suddenly you hit a key or click something unintentionally and the next thing you know, something weird has appeared on your screen, or half the screen goes dark and the rest is highlighted, or any number of different symptoms. The Magic ESC key will generally fix this sort of problem for you, in an instant.
I call it the Magic ESC key, but actually it's really just the ESC key (pronounced Escape Key). It does exactly what it says on the tin. It escapes from whatever crazy mess you've gotten yourself into without even knowing what you did! So, if this happens to you, the first thing to try is to press ESC. You'll find it at the very top-left of every keyboard and it can often be your best friend.
If pressing the ESC key doesn't work for you, you've probably got a slightly more serious problem. However, in my experience it will work more often than not!