In very simple terms pH is a measure of acidity. A pH of 7 is considered to be neutral, lower values are acidic and higher ones alkaline. Some plants will grow in pretty much any soil, but many, including marijuana, can only tolerate pH values within a certain level. For hydrophonics you're looking for 5.5. to 6.5 and for soil 6 to 7.
TDS stands for total dissolved solids, in theory it refers to any substances dissolved in a liquid, in practice it is used to determine the strength of nutrients either in a hydrophonic solution or in soil.
Both of these values are fundamental to successful growing of marijuana plants, since getting them right is what allows plants to absorb the nutrients they need for healthy growth. The further away these values are from the ideal point, the less likely the plant is to be healthy and ultimately the more likely it is simply to wither and die.
In practical terms, the simplest way to measure both pH and TDS is to use digital meters. You can use either one metre for each or a combination meter. PH metres do require a bit of TLC. Most affordable pH metres use a combined glass electrode and this needs to be kept hydrated to prevent it from drying out completely. A storage solution will take care of this. Periodic cleaning with an appropriate solution will stop the electrode becoming clogged with dirt. Likewise the probe will need to be calibrated upon first use and its calibration checked with a buffer solution every month or so thereafter to prevent drift. The plant's pH should be measured every week or so to prevent it moving too far from its ideal value.
TDS metres essential measure electrical current, this is caused by the movement of ions in the solution. To generate the movement, they use one positively-charged electrode and one negatively-charged electrode, the positive electrode attracts negative ions and vice versa. This means that TDS meters can only detect ions with an electrical charge, they do not measure neutral ions, which includes many pesticides, viruses and bacteria.
Measuring pH and TDS in hydrophonics is a simple matter of putting the probe into the water. For soil, take some soil from around the roots and mix it with an equal quantity of demineralized water. Let this sit for 24 hours and then take the relevant measurements.