When your smoke detector starts chirping at you it wants to tell you to replace the empty 9 Volt block battery with a fresh one. Because this chirping becomes very annoying and more frequent the longer you wait you should act soon and put a new battery in place. To replace the empty pile you need a ladder or other means to reach the detector. Some allow to unscrew the top of the body with the hand, for others you might need a screwdriver to insert into a gap near the latch then pull the screwdriver and the top pops off. Remove the old battery and replace it with a fresh one. Assemble the body again.
Connected or not connected to the grid, that is the question
With a new power source detectors now connected to the grid shall run at least six month, so you should replace it twice a year. As a reminder many people use the dates we go from standard time to daylight savings and back. Items connected to the grid also use a pile as backup in case a fire knocked out electricity. These piles hold up to five years.
Temporarily silencing a chirping smoke detector
If you don't have a 9 Volt block cell handy or cannot reach the detector chirping can make you mad. But many smoke detectors ran into allow to silence them temporary for up to ten hours. Locate the small button facing downwards. You need some item to reach it. A long soup ladle might do the job. Press the button for about a half second. It will beep like when it had detected smoke then be silent. Have a look at that button which now should slowly flash all few seconds. Then you are good for eight to ten hours of tranquility and can finally have a good night sleep without the annoying noises. But sometimes it starts becoming noisy again after a few minutes. So wait say 30 minutes before you actually can be sure it will be silent. If not push the button for another half second again. But keep in mind this helps only temporarily. Go ahead and install a new pile instead. That way you mute the alarm device and can go back to your normal life.
I noticed the button must lit when releasing and to push it twice that it works reliably.