Two hearts feed the gills, one feeds the body
Two branchial hearts push blood through the gills; a single systemic heart sends it to the rest of the animal. That systemic heart stops while an octopus swims, which is part of why they prefer to crawl.
Source: Natural History Museum