When I engineered arabidopsis thaliana, I used a bacterial species called agrobacterium to insert the gene of interest into the plant DNA. Agrobacterium is a plant pathogen that injects into its target host a small loop of DNA called a plasmid. In nature, the plasmid has genes that promote the synthesis of nutrients that the bacterium can ingest, but by altering the genes on the plasmid, any gene can be inserted into the plant.
Conviently, this plasmid can also exist in E. coli. We keep a strain of E.coli that has an empty version of the plasmid with all of these nutrient-synthesizing genes replaced by a special site into which the genes of interest can be inserted. The general sequence of events is to purify some of the empty plasmid by growing the Ecoli in a flask, centrifuging them, breaking them open (lysing them), and purifying the plasmid using column chromatography. (This is called a plasmid miniprep procedure). Once you have the purified plasmid, Inserting the genes into the plasmid is done in a test tube with the aid of enzymes that manipulate the DNA. You will usually amplify the foreign gene by the Polymerase Chain Reaction (PCR). This amplified product and the plasmid are then treated with restriction enzymes that cut the plasmid open as well as cut the ends off the amplified PCR product. These two pieces of DNA are then treated with DNA ligase that seals them back together into a loop: the plasmid with the gene of interest inserted.
Now that you have your plasmid with the gene of interest, you have to put it into the Agrobacterium. This can be done by electroporation or by thermal shock. By growing a suspension of bacteria, mixing in some plasmid, and then shocking the suspension with either an electric current or temperature change, pores in the bacterial cell membrane are created that allow the plasmid to enter the cell. Incorporating a plasmid like this is called transformation.