A circuit breaker is an electrical safety device designed to protect an electrical circuit from damage caused by excess current from an overload or short circuit. It works by detecting a fault condition and interrupting the flow of electricity in the affected circuit, thereby preventing fire or other hazards that may result from prolonged high-current draw.