Bacteria are stained with a violet dye and iodine, rinsed in alcohol, and then stained with a red dye.
Gram-positive bacteria have a cell wall with a large amount of peptidoglycan that traps the violet dye in the cytoplasm, masking the added red dye. Gram-negative bacteria have less peptidoglycan. The violet dye is easily rinsed from the cytoplasm, and the cell appears red after the red dye is added.