Bacterial DNA exchange is not the same as in eukaryotes. It can occur in 1 of 3 different ways.
Transduction, conjugation and transformation.
Transduction – bacterial DNA carried between cells by phage
Transformation – intake of DNA fragments
Conjugation – one cell grows a tube to the other cell and copies the plasmid DNA and gives it to the other cell (reciever)