When you are building a computer do you need to buy parts with same sockets or different sockets?
The socket type of the motherboard and the CPU must match. So if
you are going with a Socket 478 CPU, for example, you need to buy a
Socket 478 motherboard. Some online stores allow you to buy the two
as a bundle usually at a price savings too. The mobo and CPU will
be matched up so you can't make a mistake (besides socket type
there are other factors such as the front side bus speed and such).
One place that has this feature is www.mwave.com under
Catalog-->Motherboards-->Bundles. I'm sure other sites have
this feature too.
In addition, everything else must match too. You have to have the same memory and peripheral cards that the motherboard uses. You cannot use laptop memory on a desktop, nor use the wrong generation of memory, such as using DDR2 memory in a DDR3 socket. Nor can you use an AGP or a legacy PCI card in a PCI Express (PCI-E) socket. You can use shorter PCI-E cards in a longer socket, but generally not the other way around.
Also, you must have a power supply that matches all the power cords that you will need inside the computer. It must have what each drive needs, as well as what your video card may need. It must have the correct ATX connectors to plug into the motherboard. The additional ATX cable is an exception since you can sometimes plug an 8-pin variation of it onto a 4-pin socket if the board has room. The other way around might work, but is not advised. Yes, the wires are often all redundant, but, having less of them may make them warmer or provide power to less of the motherboard.