If the volume of the container is decreased the total pressure of the gases increases. Because the reaction is reversible, the equilibrium position shifts to the side of the reaction with the least moless (in this case the product side, on the right). By Le Chatelier's Principle, this has the effect of increasing the fraction of the whole pressure available to the products, and decreasing the fraction available to the reactants (because there is more moles of reactant than product). The composition of the gases change so more ammonia is present. Similarly, changing the temperature of the system causes more reactants to be produced (because the reverse reaction is endothermic.)
The partial pressure of a gas is proportional to its mole fraction, which is a measure of concentration. This means that it is possible to work out the equilibrium constant for an equilibrium reaction involving a mixture of gases given the partial pressure of each and the chemical formula for the reaction. The equlibrium constant for gases is denoted KP. For a reaction: