On the 'top' of almost every connector that goes into a computer is a raised logo or marking.
On a USB cable, it is usually the USB logo.
On a PS/2 cable, it is usually a raised line.
On a SPDIF cable, it is usually a raised line.
On a RJ-45, it is the cable release lever.
On a eSATA, it is the cable release lever.
This goes in facing UP.
Pay attention now, this is where it gets crazy. Plug in the cable so that the bit that is supposed to face UP does in fact face UP.
Mental. I can see how you get it so wrong so frequently.
It does get trickier if you are plugging into an extension card or onto a motherboard attached port in a tower case (or any case where the motherboard is not orientated flat and the right way up). For the motherboard, re-orientate the case (in your mind, put the computer down) so that it is pointing UP and plug the cable in so that it is pointing UP. This is advanced stuff now, so take a break if you haven't got it yet.
For expansion cards, UP is a different direction. Expansion cards have a front and a back. The front is the side that faces away from the CPU. This is UP. Plug the cable in so that UP is UP.
It's almost like someone thought about this…