The main function of the heart is to pump blood to the lungs and the rest of the body.