The main function of the heart is to pump blood throughout the body, delivering oxygen and nutrients to the cells and removing waste products. It also helps regulate blood pressure and circulation, ensuring that all parts of the body receive the necessary blood flow to function properly.