CPR is used for patients who cannot breathe on their own. It was later replaced by the Ambubag due to issues like human error and lack of oxygen delivery. The Ambubag was invented in the 1950s and delivers air to patients through a squeezable bag and mask. Ambubags were later replaced by artificial ventilators, which were developed in the 1960s to automatically regulate air flow and monitor patient vital signs like heart rate and oxygen levels. Ventilators use algorithms and conditions to precisely control air delivery and alert doctors to potential issues.