If the pH is too high or too low, the forces that hold the amino acid chains that make up the protein will be affected, changing the shape of the active site, so the substrate can no longer fit in. The enzyme is said to be denatured and can no longer work.