Squeeze the plastic catches at the side of the alarm's cover. This will allow you to remove the cover from the ceiling mount. Place the cover down where it will be safe.
Remove the batteries from the alarm, after waiting 90 seconds for any excess charge to be diminished.
Replace with new batteries, ensuring they are positioned in the correct alignment.
Return the cover to the ceiling mount and click it back into place. There should be a light or other means of determining that the replacement has been successful, although it varies from model to model.