Just like there a number of fantastic social networking sites, there are a number of software systems available as well. These can be used to develop unique social networking sites.
Drupal (http://drupal.org/) is a popular, freely available, open source content management system. On its own, Drupal can be used to create easy-to-use, easy-to-update websites. By extending this through the thousands of modules that the communities have developed or by creating new modules, we could create almost any type of website we want, ranging from e-commerce to social networking websites.
Drupal does make an excellent candidate for social networking websites, and Packt Publishing has a book published on this subject: Drupal 6 Social Networking (http://www.packtpub.com/build-social-networking-website-with-drupal-6/book).
Elgg (http://elgg.org/) is an open source social networking platform, complete with functionality for setting up profiles, sharing files, adding friends, blogging, aggregating RSS, content tagging, and social graphs. Elgg also has an API, allowing developers to extend Elgg by adding additional functionality as well as a RESTful API to allow other applications to interact with the platform.
Joomla! (http://www.joomla.org/) is another open source content management system, with a range of built-in social networking features. There is also a commercial add-on, the Jomsocial component (http://www.jomsocial.com/overview.html), which turns Joomla! into a truly social network.
There are, of course, options available which combine using an off-the-shelf system and a custom system. However, these mainly facilitate extending the functionality of the existing social networking platform or by integrating some of those social aspects with our own website. Such approaches include:
Facebook applications: creating applications that are accessed via Facebook's main site, providing additional features to users. For example, a map of dinosaur-friendly restaurants, which are hosted externally by the developer.
Facebook connect: Allows websites to interact with Facebook, using it as an authentication protocol, pulling friend data from it, as well as pushing, and pulling status updates to and from Facebook.
Out-of-the-box hosted solutions, such as Ning (http://www.ning.com/), that allow users to create and maintain a social network community direct from their web browser.
Google OpenSocial: A set of common APIs that make applications for social networks interoperable with supporting social networking sites. It also enables site developers to integrate the API so that other developers can build applications for that site, as well.