Haemoglobin has two jobs: take on oxygen in your lungs, and hand it over everywhere else in your body.
An oxygen molecule binds to the iron through one of its two atoms, and the bond is weak enough to come apart again. In your lungs, oxygen is plentiful, fresh molecules keep arriving, and nearly every haem carries one. In a working muscle, the cells use oxygen up in respiration, the level falls, and oxygen molecules come off the iron and move into the cells.
Easier after the first
Without oxygen, the iron is a little too big for the hole at the centre of the ring, and it sits just below it. When an oxygen molecule binds, the iron moves into the ring. It pulls its histidine along, and the protein chain that histidine belongs to shifts a little.
The four chains fit snugly against each other, so a shift in one nudges the others into a form that takes on oxygen more easily. Each oxygen that binds makes the next one easier. This is called cooperative binding: the four haems work as a team. It works in reverse too. Once one oxygen leaves, the others follow more easily. Drawn on a graph, the way haemoglobin fills makes a curve like a stretched-out letter S.
In your lungs, haemoglobin fills to about 97%. In the resting body, the oxygen level is about two fifths of that in the lungs, and haemoglobin still holds about three quarters of its load, a reserve for when you need it. In a hard-working muscle, the level falls onto the steep part of the curve, and haemoglobin gives up much more: it can drop to a third full or less.
Your muscles hold a relative, myoglobin, with one chain and one haem. With no partners to work with, its curve has no S: it holds oxygen tightly even when the level is low, so it takes oxygen from haemoglobin and stores it for the muscle. Myoglobin makes meat red, and whales and seals, which dive for a long time, have muscles packed with it.