Structural basis for the regulation of CRISPR-Cas systems