How can doctors keep patients alive when doing a heart transplant?

Heart lung bypass. During a heart transplant operation the person receiving the transplant is kept alive by the use of the heart lung bypass machine (cardiopulmonay bypass).