Bacterial genetics involves three main mechanisms of horizontal gene transfer - transformation, transduction, and conjugation. These mechanisms allow bacteria to acquire new genetic material from other bacteria to help them survive in changing environments. Mutation also contributes to genetic variation in bacteria and usually involves changes to single genes, while gene transfer can involve simultaneous transfer of multiple genes.