Two hearts pump blood to the gills, while the third circulates it through the body. Interestingly, the third heart stops beating when the octopus swims.