The CRISPR-Cas9 system works by utilizing a guide RNA (gRNA) to direct the Cas9 protein to a specific location in the genome. Once bound, Cas9 induces a double-stranded break in the DNA. The cell then uses its natural repair mechanisms, non-homologous end joining (NHEJ) or homology-directed repair (HDR), to fix the break, thus allowing for the insertion, deletion, or replacement of genetic material.