Two are gill hearts: they push blood through the gills, where it loads up on oxygen. The big main heart then sends it around the body.
While swimming, the octopus squeezes water out of its mantle. The pressure pinches the veins to the main heart, no blood arrives, so it pauses.
Source: Marine Biological Association Β· verified β