Dust and spider webs can affect smoke alarms. Clean with the vacuum cleaner once a month, and while doing so, test the alarm by pushing the test button. Batteries must be changed once a year, time this to recur on a regular date (such as on New Year's day, daylight saving or a family member's birthday). All smoke alarms will sound a short 'beep' every so often indicating that the battery is going flat.
Smoke alarms have a life expectancy of 10 years. A smoke alarm constantly monitors the air 24 hours a day. At the end of 10 years, it has gone through over 3.5 million monitoring cycles. After this much use, components may become less reliable. This means that as the detector gets older, the potential of failing to detect a fire increases. Smoke alarms that are wired into my electrical system (or burglar alarm) also need to replaced every ten years.
If an alarm regularly responds to smoke from cooking, there are several options to handle this problem. One way is to replace the alarm with one that has a button to silence it for a few minutes. You could move the alarm further away, giving the smoke more time to dissipate.
If the detector is the ionization type, another option is to replace it with a photoelectric. This detector is less sensitive to the smaller particles so is less affected by cooking smoke. The other option is to use a heat detector rather than smoke alarm.
To stop an alarm sounding, you need to clear the air in the sensor chamber. Fanning the alarm with a paper or tea towel is the best method and the alarm will stop automatically. Do not try and disable the alarm by removing the battery.