DNA fragments are cut using restriction enzymes, and the cut ends are joined together using DNA ligase.