Each protein has an ideal environment for functioning, which might include a certain temperature or pH range. If the protein is exposed to something outside of its ideal environment, it can disrupt the interactions that take place at the different structural levels, denature the protein, and prevent it from functioning correctly.