It's fairly foolproof. Nearly all the power connectors fit only the devices they were intended for. The only exception I can think of is the 4 pin 12V ATX connector that goes to most motherboards. That connector is sort of square with a 2x2 pin arrangement. Most power supplies come with a 24 pin motherboard connector that you can't miss. In many power supplies that 24 pin connector is split into 20 + 4 so you can remove 4 pins for those older motherboards that only require a 20 pin connector.
That leftover 4 pin connector looks just like the 4 pin 12V ATX connector I mentioned before. They aren't interchangeable so try not confuse them.
Needless to say, be sure the power is off and preferably unplugged before connecting and disconnecting any power leads.