Respiratory failure occurs when the lungs fail to oxygenate blood and remove carbon dioxide efficiently. This can be caused by a variety of factors such as lung diseases, heart failure, and trauma. Symptoms can include shortness of breath, rapid breathing, confusion, and low oxygen levels in the blood.