The staining process involves the oxidation of o-dianisidine by hydrogen peroxide in the presence of peroxidase, resulting in a colored compound. This compound binds to the heme groups in hemoglobin, making them visible under a microscope. The reaction is highly specific, which allows for precise identification of target substances within the tissue.