A mechanical ventilator is a machine designed to support or replace spontaneous breathing. It can deliver oxygen to the lungs, remove carbon dioxide, and help patients who are unable to breathe effectively due to illness, injury, or surgery. This critical device is commonly used in intensive care units (ICUs).