Cardiopulmonary bypass (CPB) is a technique that temporarily takes over the function of the heart and lungs during surgery, maintaining the circulation of blood and the oxygen content of the patient's body. This procedure is commonly used in cardiac surgery to allow surgeons to operate on a still and bloodless heart.