The heart functions as a pump in the circulatory system to provide a continuous flow of blood throughout the body.