When preparing bacteria for observation with a microscope, heat fixing the smear on the slide kills the bacteria to stop the potential spread of disease and adheres the smear to the slide. After heat fixing, the smear is stained.
According to the microbiology department at the University of Wisconsin-Madison, smear preparation starts with a bacteria sample mixed with a little distilled water. The sample is spread thinly on the slide and allowed to air dry. Next the slide is heat fixed by passing the underside through the flame of a Bunsen burner a few times. After proper heat fixing, the slide feels warm but not too hot. When the slide has cooled, the stain is applied.