There are two main options.
The first is to use an off-line approach where a relay is frequently employed. As the mains fails, the inverter starts up, the relay changes over from mains to inverter, and power continues with a cycle or two missed. Similarly, when the power returns and is deemed stable, the relay switches back to the mains, perhaps with another cycle or two lost.
The second is to use an on-line approach. In this approach the inverter supplies power to the load at all times. When mains is present the power to the inverter comes from the batteries, but the batteries are simultaneously charged from the mains (so there is no net discharge). When the mains fails, the batteries take up the load with no interruption. Likewise when power returns the mains powers both the inverter and somewhat more in order to charge the batteries.
A hybrid is more often a practical on-line approach where a relay will switch to direct power from the mains in the case of inverter failure, or in larger units to allow for maintenance of the batteries.
An on-line approach can handle wide swings in mains power and frequency, and can be quite tolerant of noise (at least from the perspective of preventing it reaching the device being powered). However they are also generally heavier, more complex, and need to be far better engineered since the inverter must be designed for long term continuous usage -- in contrast to a standby or off-line inverter where the inverter may be designed for brief and intermittent usage, possibly only for long enough to permit an orderly shutdown of the powered equipment.
So in brief answer to your question, yes, relays are very commonly used.
Oh, and if you think the mains currents are high, check out the currents from the batteries. I have a 3kVA on-line inverter, and one method used to reduce the battery current is to connect several batteries in series. My inverter has twelve(!) 12V lead acid batteries connected in series. As you'll well imagine, this is a pretty scary thing to connect up.