Replace batteries regularly:
Most batteries have a life of one year. Alarms start giving a chirping sound when they run low on battery. However they sound may not be audible and you might remain unaware that the alarm has gone dead. Make a schedule for yourself for changing the battery religiously. Choose a special day like your birthday or new year to do that so that you remember. Do not take any shortcuts with safety.
Lithium batteries have a longer life than the usual carbon-zinc ones. They can go up to 7-10 years which is pretty much the same life of your alarm. So after this time you might have to change both your alarm and the battery. You can also get alarms which use the house power and keep a battery only in the reserve so that you do not have to keep replacing them.
Most alarms have a life of ten years and they should be tested once every month for functionality. All alarms have a test button them. Do a test check by pressing it every month and checking if the noise gets to every person and corner of the house.
Alarms come with a manual booklet with information on installation and maintenance. Read through it and follow it. Vacuum your alarm for removing dust, cobwebs and insects which will hamper its performance. Keep it clear from any sticker or cover which might block the smoke particles. The wall it is mounted on should be moisture free.