Contrary to most mollusks, octopuses have a closed circulatory system (i.e. blood is contained within vessels). To pump the flow,
Octopuses have three hearts: two branchial hearts and one systemic heart
The branchial hearts pump blood to the gills, where oxygen is taken up. Blood then flows to the systemic heart, where it is pumped to the rest of the body.
They are all located at the back of the mantle, so you will often see anatomy illustration with the legend “heart” instead of “hearts”.
Thanks to M.J. Wells studies, we also know that when an octopus is really excited or startled, its heart misses a beat or two. Fortunately, any single octopus heart can stop for some time, the remaining two providing enough circulation to keep the animal alive for a while (more on that, and love, in another post).