Smoke alarms are essential safety devices that detect smoke and alert occupants of a building in the event of a fire, giving them time to evacuate and seek help.