This is an quilibirum law tthat can be aplied to closed systems at dynamic equilibirum. Closed means that nothing can enter, nor leave the chemical system and dynamic equilibrium means that the rate of the forward reaction is equal to the rate of the reverse reaction so that there is no net loss or gain of product or reactant.
With this principle, you can predict the changes that will occur with a change in temperature or pressure. Any change in one of these 2 factors means the system will try to oppose the change and so so you can work out which way the position of equilibrium would shift.
So if the forward reaction is exothermic (i.e. gives out heat energy), then the reverse reaction must be the exact opposite which is endothermic (takes in heat energy). So if you increase the temperature, the system would try to oppose the change and decrease the temperature. To decrease the tempearature, the endothermic reaction would take in the excess heat energy and the position of equilibirum would shift towards the endothermic side towards the reactants, so the quilibrium yield of the reactants would increase and the equilibrium yied of products would decrease. In the case of a decrease in temperature, the system would try to increase the temperature. So this would favour the exothermic reaction which gives out heat energy and so the position of equilibrium would shift towards the exothermic side towards the products and so the equilibirum yield of the products would increase.
In the case of pressure, the side of the reaction with the fewest number of gaseous moles is at the lower pressure. In the case of the Haber reaction which is N2 + 3 H2 → 2 NH3, the left hand side (reactants) has 4 gaseous moles whereas the right hand side only has 2. So if you increase the pressure, the system will try to oppose the change by decreasing the pressure, so the position of eqiilibirum would shift to the side with the fewest number of gaseous moles which is the right hand side, increasing the equilbirum yield of ammonia. If you decrease the pressure, the system would try to increase the pressure again and so the position of equilibrium would shift towards the left to the reactants.