Smoke detectors play a vital role in maintaining a safe home. They are usually placed in high areas in various rooms in the home. Many detectors will chirp when the battery needs to be replaced. It may be a good idea to keep a regular schedule to essentially replace the batteries in the smoke detectors all at once. Many also have a test function that you should use to verify each smoke detector is working properly.
Safely climb up a sturdy step ladder to reach the smoke detector. Depending on the model you have, most will require a counter clock wise turn to detach it from a clip. Typically, you will have to disconnect a wiring harness from the back that you can either use your hands or carefully pry away with a flat head screw driver.
On the back of the detector, open the door and replace with a 9 volt battery, although some maybe AA batteries. Reconnect the wiring, and attach back to the ceiling. Press the test button and you should hear some chirping to know it is working.
Here is a video from Expert Village that shows you how to do it.