Compatibility issues for ATX power supplies and motherboards
When ATX was originally introduced there was just one kind of ATX power supply. If you had an ATX power supply and an ATX motherboard then you plugged them together and they worked. At least they did if the power supply delivered enough wattage. Back then ATX life was simple. Nowadays things are a bit more complicated. Now you can get an ATX power supply and ATX motherboard and end up with connectors which don't match. Even if the connectors do match you can still run into trouble even though the power supply appears to have sufficient wattage. This page introduces you to the issues you need to consider to maximize the chance that an ATX power supply and motherboard will work together properly. The information below is just a summary. The green links provide more detailed information on the subject.
The motherboard main power cables
The ATX standard has two different versions of the main power cable: the original 20 pin cable, and the the newer 24 pin cable. The 24 pin cable is just the 20 pin cable with 4 extra wires added to the end to provide extra current. If your power supply main power cable and motherboard main power connector both have the same number of pins then they'll (of course) fit together just fine. But what happens if they don't match? If you plug a 24 pin power cable into a 20 pin motherboard then it will work fine but you often can't get them to physically fit together because something gets in the way. If they don't fit together then you can get an adapter cable which converts a 24 pin power cable into a 20 pin cable. You can always plug a 20 pin power cable into a 24 pin motherboard but whether it works over the long haul depends on how much current your motherboard draws. Those extra 4 pins provide more current carrying capacity. Plugging a 20 pin cable into a 24 pin motherboard can strain the 20 pins that you're using. If the motherboard draws too much current then it will overheat the connector which can burn or melt it. There are adapters which convert 20 pin cables into 24 pin cables but they don't solve the problem and can cause problems of their own. Many newer power supplies come with a 20+4 power cable which has a 24 pin connector which can be split into two pieces: a 20 pin piece, and a 4 pin piece. This kind of power cable is fully compatible with both 20 and 24 pin motherboards. If you're buying a new power supply then try to get one with a 20+4 power cable.
The 12V CPU power cables
CPUs used to be powered by the 20 pin main power cable. Almost all current motherboards power their CPU with a 12 volt CPU power cable. There are two kinds: the 4 pin 12V cable and the 8 pin 12V cable. The 4 pin cable is often called a P4 cable (although it's a very bad name) and the 8 pin cable is called an EPS12V cable. You must plug a cable into this motherboard connector or the CPU will receive no power. The compatibility rules between 4 and 8 pin connectors have a lot in common with the rules for 20 and 24 pin connectors. The best choice is to plug a 4 pin cable into a 4 pin connector, an 8 pin cable into an 8 pin connector, or a 4+4 cable into either kind of connector. You can get adapters which will convert various kinds of power supply cables into both 4 pin and 8 pin 12V cables. You can plug a 4 pin 12V cable into an 8 pin motherboard and it will sometimes work properly but other times it won't work at all or will burn/melt the connector. As with plugging a 24 pin cable into a 20 pin motherboard connector, you can plug an 8 pin cable into a 4 pin connector and leave 4 pins hanging over the end but you can also have the same problems with things preventing it from fitting. It will work fine if it fits. If you're buying a new power supply then the safest choice for the long haul is to get one with a 4+4 power cable because it's compatible with both 4 and 8 pin connectors.
The aux power cable
A cable you're not likely to run into is the 6 pin aux connector. Some older AMD dual CPU motherboards have them. If the motherboard requires this connector then you have to get a power supply which provides one. Most current power supplies don't have aux cables and aux cable adapters apparently don't exist (unless you're good with a soldering iron and can build your own).
Where's most of the load? 3.3/5 volts or 12 volts?
How a computer uses power has gone through a lot of changes over the years. Older machines used to consume most of their power from the 3.3/5 volt rail. Since the Athlon 64 and Pentium 4, computers have consumed most of their power from the 12 volt rail. Older power supplies provided the bulk of their wattage on the 3.3/5 volt rail and new supplies deliver it on the 12 volt rail. As a result, you need to be careful when plugging an old power supply into a new computer or a new supply into an old computer. If you know that the power supply won't be used in an older computer then you can use an ATX12V 2.0 or newer power supply which delivers the bulk of its power on the 12 volt rail and not much power (less than 150 watts) on the 3.3/5 volt rail. If you need a power supply for an older computer then you can use an ATX12V 1.3 or earlier power supply which provides most of its power on 3.3/5. There are also many newer ATX12V 2.0 or newer power supplies which provide enough wattage on 12 volts for newer computers as well as enough wattage on 3.3/5 for older computers. Those are the best supplies because they provide enough wattage for all kinds of machines.
Obscure considerations
If you're easily worried then you might want to skip this paragraph. Most of the things mentioned here are either more detail than you need to know or problems which rarely crop up. But these issues are listed for the thorough types out there (you know who you are). If you've been researching power supplies then you've probably noticed that newer ones usually come with dual 12 volt rails. Sometimes they have three or even four 12 volt rails. This subject of multiple 12 volt rails is more complicated then you may think. And if you have a multiple 12 volt rail power supply in a very high-powered computer then you may have to deal with rail balancing problems. You can have cross loading problems with some power supplies if you draw unbalanced amounts of wattage from the 3.3/5 volt and 12 volt rails. You can even get into trouble if you draw too little wattage.