Well, first of all, you should never mess around with the cables and wires while the computer is running. Bad things could happen. Always shut it down and unplug it from the wall when working inside a computer.
I figure you just bumped something inside your computer while cleaning it. The best way to prevent anything like this happening again is to just be careful and safe while working inside a computer.