Enzymes are folded into a shape that accepts the substrate molecule. This is determined by the sequence of amino acids that form it. As you approach the optimum temp, enzymes gain kinetic energy, and so collisions with substrates are more frequent. As a result, the rate of reaction is highest. As you go beyond the optimum temp, bonds holding enzymes break down, the shape of the active site changes. So it is denatured