Were you at home or using someone's server on a public computer?
I have no idea how they did this, but at school the IT people could screw with the desktop on anyone's laptop who was on the school server. They were rumored to move around the cursor or open and close certain applications just to irritate people they didn't like. (I say rumored because it never actually happened to me.)
Either way that is a very strange thing that happened to you! When my computer does act up, I'm usually like Trinity and just wait til the storm passes.