MySQL alone doesn't provide the failover mechanism. This is actually quite difficult problem to solve universally, so it's best to solve it on a case-by-case basis with specific tools.
As you don't mention which OS you're using, so I'll just throw some examples how it could go with Linux. When you have a regular replication set up, you might want to take look at Linux HA project for the tools to make the failover happen. With these, you can promote the slave DB when the master fails.
Another possibility is to use DRBD, which would make the replication happen at the storage level, so MySQL wouldn't actually know there's replication going on. Problems with this approach are similar to the ones with regular replication, your primary and master must be aware what the situation is. For this, Linux HA tools would be the best choice.
MySQL also has clustering features, but they will require at least three servers, impose some limitations for the data model. With small databases it's not really worth the trouble.
On top of these, you'll want to use some kind of connection pooling. It'll make the failover transparent for clients, as they won't have to know which database is actually doing the work.