Transformation.
A piece of foreign DNA in the environment is taken up into a competent cell by active transport via a receptor site on the surface of the cell.