First, the section with the desirable gene must be identified. Assuming that has already happened, the section of DNA must be excised from the original genome using restriction enzymes, which recognize certain DNA sequences and snip DNA at those sites. DNA ligase is used to "glue" these ends back together. The DNA is inserted into a plasmid (also with restriction enzymes), which would usually contain antibiotic-resistance genes (so they survive in an environment containing the antibiotic, which would also help show if the bacteria have been successfully transformed).
Then comes the actual transformation process. The bacteria to be transformed are mixed with calcium chloride (which causes the bacteria to be more receptive to the plasmids) and then mixed with the plasmids. The bacterial cells are subjected to a heat shock (the solution is heated and rapidly cooled, e.g. by placing the mixture in a hot water bath and quickly transferred to ice) so they will take up the plasmid (since the temperature change makes the membrane more permeable). The bacteria are placed on a growth medium containing the antibiotic they're resistant to. Only those successfully transformed would survive.
If you have both parents with long ears and some of the offsprings have short ears, you can say both parents are heterozygous for this. Both have a dominant (long ear), and a recessive allele (short ear).
To prove this, you can draw a Punnett square, and you'll see the probabilities of the offsprings.