Gene targeting is typically achieved through the use of homologous recombination or CRISPR-Cas9 technology. Homologous recombination involves the exchange of DNA sequences between similar or identical DNA molecules, allowing for precise modifications. CRISPR-Cas9, on the other hand, uses a guide RNA to direct the Cas9 enzyme to a specific location in the genome, where it introduces double-strand breaks that can be repaired to include the desired genetic changes.