KH is carbonate hardness, temporary hardness, buffering capacity or alkalinity. This is a measure of the amount of buffering minerals in the water (mostly carbonates), that resist acidification of the water (it is basically the lime scale you see in the kettle).
The higher the KH, the more resistant your water will be when it comes to pH changes. Basically, if you were trying to use CO2, your KH should be no lower than 4dH otherwise, you have to monitor your pH carefully as low KH often results to pH crash. Your KH should measure higher than 4dH so large pH swings can be avoided.
To clarify further, KH is basically a pH buffer. The higher your KH, the more stable your pH will be and the more difficult to adjust your pH. If your KH is lower than 4, pH swings are likely to happen. Adding sodium bicarbonate will increase your KH therefore stabilizing the pH and preventing it from decreasing in all of a sudden which could result to pH crash killing the fish. If you use RO water, its KH is basically non-existent or zero, so pH can change dramatically with the use of RO water.
GH is general hardness or permanent hardness and is a mixture of calcium and magnesium salts. GH is independent to KH and pH.
http://www.fishforum.com/freshwater-aquariums/what-kh-1892/