what happens to user connections when an AG fails over?
what controls the switching of connections to the new primary node? 


The Availability group (AG) listener directs incoming connections to either primary or read replica depending on how the AG is configured (whether it allows read requests or not).

When a failover occurs, a role reversal happens and a secondary replica transitions to the primary role and the former primary will transition to a secondary role.

During a failover, all client requests are terminated. This is your application downtime. Now, after the failover, when a client reconnects to the AG listener, the listener will reconnect to the new primary (except for read intent connect requests).


  Anything in the connection string, AG settings, changing timeouts, etc. that would help make the switch faster for users?



If your application supports :


MultiSubnetFailover = TRUE, then you will have a perf gain (as described in my answer.) 
MultiSubnetFailover = False, then you should lower the HostTTL settings to a lower value e.g. 5 secs vs 300 secs of default.



Ref: 


How the Connection Access Configuration Affects Client Connectivity
Connection Timeouts in Multi-subnet Availability Group