Cardiopulmonary bypass, also known as heart-lung bypass, is a technique used in certain open-heart surgeries and complex cardiac procedures. It temporarily takes over the function of the heart and lungs by diverting blood from the body to an external artificial heart-lung machine for oxygenation before pumping it back into the body. By taking over these functions, cardiopulmonary bypass allows surgeons to operate on a still heart during cardiac surgery.