The equation for the production of Ammonia is:
N₂ + H₂ → NH₃
N₂ + H₂ (LeftHandSide of equation) : 2 Nitrogen atoms; 2 Hydrogen atoms
NH₃ (RightHandSide of equation): 1 Nitrogen Atom; 3 Hydrogen atoms
To balance the equation you must place in front of each compound/molecule/element that makes the amount of atom of each element equal on both sides of the equation.
N₂ + 3H₂ → 2NH₃
LHS RHS
Nitrogen 2 2
Hydrogen 6 6
So essentially the set of coefficients you use to balance the equation are 1 for N₂, 3 for H₂ and 2 for NH₃.