Two-component regulatory systems allow prokaryotes to sense and respond to environmental changes. They typically consist of a membrane-bound histidine kinase that senses stimuli and a response regulator that mediates the cellular response through differential gene expression. The histidine kinase becomes autophosphorylated when it senses a stimulus and then transfers the phosphate to the response regulator, causing a conformational change that activates target genes. These systems enable bacteria to adapt to a wide range of environments and stresses.