There's lots of drawbacks in this approach - DNS records cached, and often for much longer than time that you specify in the DNS record (TTL). Thus it will make your site inaccessible for certain period of time, at least for some users. Listing normally both records and removing failed ones is a bit better but still those users who try the failed record will experience long delays and error messages.
Despite the advantages (it's easy to setup and cheap), you still may want to check other approaches to failover.
Anyway, if you are still into it, there's dynamic DNS to change records. You will also need some service that will monitor your hosts and update the DNS. You may setup DNS server and monitoring yourself. Or there's a lot of DNS providers that can do some kind of monitoring for you and do the updates (like tzoha.com or try googling dynamic DNS failover). But don't be fooled by their ads, they still can't overcome conceptual problems of DNS failover.