Some smoke detectors are powered by a 9-volt battery, some by the home's electrical system, and some a combination of both (wired into the home's electrical system and equipped with a 9-volt battery back up.) If you elect to purchase smoke detectors connected to your home's electrical system, have a qualified electrician install them. If you purchase battery-powered ones, you can install them with a screwdriver and a drill but install according to the manufacturer's instructions.
Smoke detectors save lives but only if they’re working.
If you have hard-wired smoke detectors you need to replace the entire alarm every 10 years or when they begin to chirp. If your smoke detectors are battery powered it is a good idea to replace the battery once a year whether or not the battery still works. A good way to remember when to change your battery is this: "change your clocks - change your batteries" and when you do, use a soft brush to clean off dust particles that could compromise your alarm’s detecting ability.