To keep a tank healthy, there are many aspects to its chemistry that need to be kept in balance. Natural aquariums (lakes, oceans) generally do a good job of this but not always. For example, the increasing levels of carbon dioxide in the atmosphere (now over 400 ppm!) not only cause climate change and rising sea temperatures, they also cause the seas to become more acidic. Carbon dioxide in the air can also dissolve in the water, turning into carbonic acid. This phenomena is called ocean acidification.  In a saltwater aquarium, there are several elements to its chemistry that need to be keep in balance.  Keep in mind that an imbalance in one dimension of the water chemistry can produce side effects which cause other elements of the chemistry to be thrown off balance.  

The Nitrogen Cycle

Aquariums require a balance between fish waste and bacteria which eat that waste. The process entails bacteria "eating" fish waste and turning it into less toxic substances. The bacteria transform fish's nitrogenous waste, ammonia ( which actually mostly comes from their gills), into Nitrite. Other bacteria will transform that Nitrate into Nitrate and yet another type of bacteria will turn Nitrate into nitrogen gas, completing the cycle.  Read about the Nitrogen cycle here.  For more information about how to initiate the cycling, refer to the Setting Up the Aquarium section.  

Acidity and Buffers

The acidity of a tank is measured along the pH scale.  pH describes the amount the of hydrogen ion H+ which is acidic.  Lower pH values mean higher acidity where as high pH means the water is base (i.e. low acidity).  Pure water has a pH 7 where as we want the pH to stay in the range of 8.1-8.4.  Keep in mind that is is a logarithmic scale (similar to earthquakes) so a pH of 7.0 is ten times more acidic than at 8.0.  

Buffer can also be called KH, carbonate, bicarbonate, or saltwater hardness. Regardless of the name, buffer keeps pH stable since the carbonate ions will bond with the H+, absorbing the acid.  If the KH is low, there are few carbonite ions in the water and it is possible for the pH to swing wildly.  This in turn causes the pH to be more reflective of how much acid is being produced in the tank from other sources. The acids produced from all living things as they break down biological materials and produce waste (ammonia is an acid, so are the products of almost all digested and broken down protein) will be more effective at lowering the pH when KH (carbonate hardness).  Moreover, the nitrogen cycle is fueled by bicarbonate (buffer) and as bacteria process the ammonia down to nitrite then nitrate, they use bicarbonate which leads to the buffering capacity of water being decreased. Excess waste (or worse dead organisms) will mean even more bacteria using carbonate as they break down ammonia.  This in turn makes the tank more unhealthy (pH swings), possibly causing more organisms to die and produce a vicious cycle caused a tank crash.  

See here for more information about testing supplies to monitor pH and KH

If ammonia builds up excessively, check: Ammonia Chemical Detoxification (Emergency)

Calcium and Magnesium involved with KH and pH

Calcium and magnesium become depleted as some animals ( coral, some hard algae species,mollusks, crustaceans, and even sponges) assimilate these minerals. To deposit these minerals, organisms use the bicarbonate ion, which is the same molecule which acts as a buffer to stabilize pH in tanks. So the pH generally tends to go down as the buffering capacity of water (the carbonate ion) is used up by the corals and other organisms assimilating carbonate( calcium and carbonate make calcium carbonate skeletons). Remember that carbonate is also used up by always present nitrogen cycle and the buildup of some organic acids which no animals or plants can process.

Carbonate amount is alkalinity (also called carbonate hardness or KH) and an alkalinity test kit/KH test kit is cheap and useful for watching the carbonate hardness of your tank. It is most commonly measured in degrees of carbonate hardness (dKH) and you want to stay between 9 and 12 dKH for reef tanks. If you don't do water changes and don't monitor /supplement this parameter, your corals will slow down growth and the tips and edges won't be as colorful ( tips colors are the actual color of of the coral before the symbiotic algae can migrate in and indicate rapid growth).

The API test kit for KH and Calcium and Seachem test kit for Magnesium are fine for most hobbyist aquariums. The Magnesium test is a bit more expensive and complicated but worth it as magnesium and alkalinity levels need to be within range for the deposition of new skeleton by corals. Certain corals, including soft corals like leather corals and Xenia, can do well or even thrive in low alkalinity and calcium. A few durable stony corals, some species of Montipora (digitata, capricornis, spongodes), Pocillopora sp., and Pavona sp. can live in this but do not grow well. It is possible for a tank to drop down to dKH 7-8 (1.8-2.2meq/L) and/or have calcium as low as 300mg/L with stony corals living for months with little growth but no mortality. To be sure to avoid this in fast growing reefs, getting in the habit of supplementing then retesting is a more efficient method to keep up with these essential parameters for coral growth. As an alternative to testing, doing salt mixed with reverse osmosis water changes of 10% a week and watching specifically KH as an index for the other stuff if you want to do the minimal for a stress free reef. For new tanks calcium and magnesium are not as important to watch as KH as corals and purple coralline algae usually aren't draining these minerals too hard initially. Later when everything is more established and corals are growing fast you can start developing dosing plans with supplements.