Zinc-finger domains are the most common DNA-binding domain found in proteins. With a $$\beta,\beta,\alpha$$ fold around a central zinc ion, these domains are able to specifically recognise, and bind to, DNA sequences.
Specific amino acid residues are able to interact with known DNA sequences. Prior to CRISPR-Cas gene editing technology being developed, zinc-fingers were used to target nucleases. This was not very specific, and could result in additional cuts to the DNA where similar sequences existed at other loci in the genome. Other protein interactions were able to be directed using zinc-finger domains, but guide RNAs (gRNA) is generally preferred now due to the specificity it offers, as well as the ease with which oligonucleotides can be produced.
By coordinating the protein around a central zinc ion, the structure of the protein is maintained to allow specific binding.
In vivo, these DNA-binding domains are used to control transcription factor binding. This allows specificity to be maintained, and was how these proteins were first discovered. Today, these domains can be engineered to target protein-DNA interactions where gRNA is not used.