The equilibrium in a system will shift to minimise the effect of any imposed changes.
If you increase the pressure in a reaction vessel, then this will favour the formation of the reaction direction which results in fewer molecules.
e.g. 3H2 + N2 --> 2NH3
increasing pressure will favour the forward reaction as this lowers the total number of molecules in the reaction mixture, therefore lowering pressure. So the equilibrium has shifted to counter the imposed change
Similarly, raising temperature will favour the endothermic reaction. The endothermic raction takes in heat, so the imposed change has been counteracted.