On failover the clients' network connections are broken, and in-flight transactions are rolled back as part of the recovery process on the other server. The client will get an error message, most often related to the broken connection, and will need to reconnect to the server.
Clients without an in-flight transaction may be transparently reconnected to the new server.