In histology, osmium tetroxide is primarily used as a fixative and a stain. It is especially effective for preserving and visualizing cell membranes and lipid-rich structures. The compound reacts with unsaturated fatty acids in the lipids, forming a black precipitate that provides excellent contrast for electron microscopy and other imaging techniques.