The color of blood is determined by the substance elements contained in blood cell proteins. The blood of humans and vertebrates is red because the blood contains a large amount of iron-containing hemoglobin.
The octopus contains a blue pigment protein, which is what we usually call copper-containing hemocyanin. The function of this hemocyanin is to transport oxygen. When the octopus moves, oxygen enters the octopus’ blood vessels and combines with this hemocyanin, thus forming blue blood.