Short Answer:
As others have said, in the older models just about everything was proprietary. In the newer Macs they have switched to Intel and many parts are PC compatible except for the motherboards. So you could easily take the hard drive and the RAM out of a Mac and put it into a PC. I believe the hard drive in my Macis just a Samsung.
Now, as for the reliability of Macs, since they have similar parts to a PC they can fail just as easily. Hence the need for "Apple Care".
Long Answer:
However, the software is generally more reliable because the software makers (and the OS makers) can predict the hardware its going to run on because there is only a handful of legitimate Mac configurations.
Compare this to Windows applications, drivers and hardware that has to play nicely with an unlimited amount of configurations and brands. This is where the so called "Just works" name comes from.
Much of the Apple price comes from its operating system. By default it has a ton of seriously high quality applications installed. For example, it has a iMovie which would cost $200-400 for a Windows equivalent. If you want to "hacky stuff" that technicians do but most users don't, such as partition your drive and install Windows on the other side. Apples Bootcamp will help you do it. Just open Bootcamp, drag the slider to the partition size you want, print out the instructions and off you go. There really isn't a built in Windows equivalent. Mac has tried to make all this stuff as easy as possible.
When things do go wrong with a Mac and you have Applecare, its usually nice and easy for the customer. Drop it into an Applestore, wait a few days, good as new. This is more desirable to clients than having to trust a random PC store which may or may not be competent.
Macs advantage (and some would say a disadvantage) becomes from being the same, not very changeable, predictable. As you can imagine, computer users like predictability.