This is a very open question there at tons of different ways to do this, depending on what you'll be hosting.
For enterprise applications the Red Hat Cluster suite works quite well, you then have open source projects such as drbd which sync's data and is commonly used for mySQL active/passive clusters. Linux-ha.org etc
If you're hosting i.e jboss, tomcat they have their own built in clustering, session clustering etc.
Apache has module support for load balancing as well.
Then you have a wide array of network level load balancers. For the actual switching process heartbeat, pacemaker etc.