You have plenty of choices.
Cheap and effective, use DNS round robin, nearly all the big players use that (although not only for failover). Here's an example:
$ host amazon.com
amazon.com has address 22.214.171.124
amazon.com has address 126.96.36.199
amazon.com has address 188.8.131.52
amazon.com mail is handled by 5 amazon-smtp.amazon.com.
In this case it's the browser that handles failover. It's quite effective actually and all you have to do is configure your DNS entries.
Another choice not limited to HTTP / SMTP can be having hardware load balancers as for example F5's BIG-IP.
Then there is a plethora of other solutions and no space to list them all but it's easy to google for them.