Horizontal gene transfer involves several mechanisms that can increase the genetic diversity of bacterial populations.
One of these mechanisms is bacterial conjugation in which a donor cell transfers genetic material to a recipient cell through a pili which function as a conduit.
Another mechanism of variability is through bacteriophages where genetic material is moved from one bacterium to another, this method is called transduction.