These sites are built by software developers and are based upon "Back Office systems " such as SQL servers and hosted on vast Server farms. They cost millions and take a lot of hard work and long hours to put together. It not something you can nip down to PC world and buy….
This is facebook headquarters