Plasmids are autonomously replicating extrachromosomal DNA molecules that are commonly found in bacterial cells. They allow for the horizontal transfer of genes between bacteria, providing genetic variation and increasing the likelihood that adaptive traits will persist in the population under environmental pressures. Plasmids can carry a variety of genes, such as those conferring antibiotic resistance or enabling bacterial conjugation. They are manipulated in the laboratory by inserting foreign DNA fragments using restriction enzymes and ligase.