Step-by-step explanation:
through the process of electrolysis.
electricity (loose electrons under "pressure") is sent through water allowing the oxygen atoms to bind enough electrons to become independent O2 molecules and detach from water molecules, hence "freeing" themselves as oxygen gas. which in turn also creates free H2 molecules and therefore hydrogen gas.
the free oxygen collects at the positive electrode, the free hydrogen at the negative electrode.
an additional option is to collect the free oxygen that is simply mixed into the water and allows fish to "breathe" (the gills do NOT break oxygen out of the H2O molecules but use the mixed-in free O2 oxygen between the H2O molecules).
that is the reason why a fish tank needs the constant air stream bubbling through the water (or we would have to constantly stir the water in the tank rigorously), and why truly still water bodies "die" (any originally mixed-in oxygen leaves over time, literally suffocating any oxygen-needing lifeforms in those bodies of water).
to capture this, cool the water down to about 4° C (about 39° F), at which point water has its greatest density (below that water expands again preparing for the larger volume needed by the crystalline grid of water ice). that pushes/squeezes a lot of the mixed-in elements incl. free oxygen out of the water.
but that is very little compared to an electrolysis result.