The answer to 'how does carbon monoxide detector work' is that a carbon monoxide (CO) detector is a safety device that monitors the air for the presence of this odorless, colorless, and toxic gas. When the detector senses dangerous levels of CO, it sounds an alarm to alert you so you can take action to get to safety and fix the problem.
CO detectors use electrochemical sensors to measure the concentration of CO in the air. When the sensors detect CO levels above a certain threshold, the detector triggers the alarm to warn you. This allows you to evacuate the home and call for professional help to identify and fix the source of the CO leak, which is often a malfunctioning fuel-burning appliance like a furnace, water heater, or stove.