Here is an introduction by Mr. Lutz on the basics of chemical equilibrium.