Gram staining is a method used to classify bacterial species into two groups: gram-positive and gram-negative. It involves staining a bacterial smear with crystal violet dye, iodine, decolorizer, and safranin counterstain. Gram-positive bacteria appear purple after staining due to the thickness of their cell walls retaining the crystal violet dye. Gram-negative bacteria appear pink since their thinner cell walls are decolorized by the alcohol or acetone wash, leaving only the safranin counterstain visible. While Gram staining is a standard first step in bacterial identification, not all bacteria can be definitively classified by this technique alone due to variations in cell wall composition.