A mains powered alarm takes its supply from the property's electrical installation and keeps a standby cell for power cuts. The reason specifications call for them is not that they detect better, because they do not. It is that nobody can take the battery out of them for the television remote, which is the most common way a protected home becomes an unprotected one.
What mains power changes
The alarm is powered by the fixed installation and holds a backup cell that carries it through a power cut. Battery removal stops being possible on sealed units and stops being useful on the rest. In a rented or licensed property this is the whole argument: the protection no longer depends on a tenant replacing a battery in a device they did not choose.
How they are wired
Alarms are supplied from the fixed wiring, commonly from a dedicated circuit or from a lighting circuit depending on the design, with an interconnect conductor between units where the interlink is by cable rather than radio. It is electrical work, it should be done by a competent electrical installer, and it should produce an electrical certificate as well as leaving you with working alarms.
When the specification demands them
The grade in a dwelling specification is what decides this, and licence conditions for houses in multiple occupation frequently state it directly. Meeting the coverage with battery alarms where mains powered units were specified is a real failure even though every room has an alarm, and it is one of the most common reasons a well meaning landlord fails an inspection.
Service life still applies
A mains powered alarm is still a sensor with a finite life, usually stated on the back with a manufacture date. Mains power removes the battery failure mode; it does not stop the chamber ageing. Replacement on the stated schedule applies exactly as it does to battery units, and it is the part of the regime landlords most often miss because the alarms look fine.
Questions people ask about wired smoke detectors
Do mains powered smoke alarms need batteries?
They carry a backup cell so they keep working through a power cut. On sealed units it is not user replaceable and the whole alarm is replaced at end of life.
Can I fit mains powered alarms myself?
It is electrical work on the fixed installation, so it needs a competent electrical installer, and in a rented or licensed property you will want the certificate that comes with it.
Are mains powered alarms required by law?
Not by the statutory minimum for rented homes in England, which simply requires working alarms. They are required where the specified grade or a licence condition says so, which covers a great many rented and licensed properties.