Cas9 functions by forming a complex with a guide RNA (gRNA), which directs the enzyme to a specific sequence in the genome. The enzyme then cleaves the DNA at this targeted location. This capability makes Cas9 an invaluable tool for genetic research, allowing scientists to knock out genes, introduce mutations, or insert new genetic material.