One way would be to have your site on two different servers, then have a site monitor at a third location that monitors the connection to the main server (where your DNS usually points). If it detects that the site is down, have the monitor execute a script or hit the update URL of a dynamic dns provider (such as DtDNS [which I operate], or DynDNS.com) with the IP address of your backup server specified for your domain/hostname. This will update the DNS record and direct traffic to your backup web server. When the main site is back online, the monitoring can run another script or URL that will put the "real" IP back.
One key here is to have DNS hosted at a provider that has an API into their system so that your domain can be updated quickly, and that keeps the TTL low enough so that visitors will be redirected relatively quickly.
Another is that the site has to be monitored from an outside, objective location. You cannot run monitoring on the same web server as the site is on. If the whole server goes down, the monitoring/update method will go right down with it.