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