faulty smoke detector fire alarm won't stop beeping

How to get your smoke detector to stop beeping. What to do with a faulty smoke detector that won’t stop beeping.