Thiazide diuretics are a class of medications primarily used to treat hypertension and edema by promoting the excretion of sodium and water from the body through the kidneys. They work by inhibiting the sodium-chloride symporter in the distal convoluted tubule of the nephron, leading to decreased blood volume and, consequently, lower blood pressure.