An arterial blood gas (ABG) test measures the levels of oxygen (O2), carbon dioxide (CO2), and the pH of the blood. It is a critical diagnostic tool used to assess a patient's respiratory and metabolic status. The test provides valuable information about lung function and the body's acid-base balance.