As temperature increases, the rate of reaction increases because enzyme and substrate molecules move around faster and collide more frequently, until the optimum temperature is reached, after which the enzyme becomes denatured and stops working
At extremes of pH or very high temperatures, the shape of an enzyme's active site can change, so the substrate can no longer bind to it and the enzyme cannot catalyse the reaction