As was already explained,
pH measures how acidic or basic/alkaline a solution is. Depending on pH, certain chemical processes will change or speed up/slow down. For example: Calcium carbonate (the stuff corals build a majority of their skeleton from) can be precipitated faster in more alkaline solutions. This means it is
sometimes possible to improve coral growth with raising the pH, but of course all other requirements for coral growth have to be met as well. The pH will increase throughout the day due to photosynthetic activity. Once the light goes dim and photosynthetic activity slows down, the pH will drop again. That's why many people have an algae refugium with an inverse day/night cycle so there will always be some photosynthetic activity to reduce the pH changes.
KH stands for "Karbonathärte" (the German word for
carbonate hardness), but it is also often used (or confused) with
carbonate alkalinity. These terms describe the water's buffering capacity against acidification that comes from carbonates:
Carbonate hardness = bicarbonates + carbonates = [HCO₃⁻] + [CO₃²⁻]
Carbonate alkalinity = bicarbonates + 2 ⋅ carbonates = [HCO₃⁻] + 2 [CO₃²⁻]
In reef tanks the difference between carbonate
hardness and carbonate
alkalinity is arguably negligible, as most carbonates will be present as bicarbonates and therefore the factor 2 in the formula above won't make too much of a difference.
Total alkalinity is what most test kits actually measure and is not restricted to carbonates and therefore describes the water's whole buffering capacity against acidification:
Total alkalinity
=
carbonate alkalinity + other alkalinity providing species
=
[HCO₃⁻] + 2 [CO₃²⁻] + other species + [OH⁻] - [H⁺]
Even though pH and alkalinity are related it is possible to increase one parameter without seeing much change in the other one. An arguably easy way to understand this is increasing alkalinity with sodium bicarbonate (very commonly used). While adding sodium bicarbonate will directly increase alkalinity by providing bicarbonates, it increases CO₂ levels which acidify the water (and therefore lower pH). It takes a while until the CO₂ has left the system and you can see a pH benefit. There are more reasons why these related parameters can act independently, but I feel like an actual chemist will be able to explain this better than I can.
Usually you won't have to worry about pH if you don't have high CO₂ levels in your home and use a skimmer to ensure proper gas exchange. In fact, chasing pH levels can sometimes do more harm than good, so I recommend you start with keeping alkalinity stable. You also have to measure pH at the same time of the day to have comparable results, which makes keeping track of it a bit more difficult without a pH probe that measures it 24/7.