The thiazide diuretics inhibit a Transport protein in the Nierenkanälchen. Thus less ions are absorbed from the primary urine and because of the change in osmotic pressure more water is excreted.
https://de.wikipedia.org/wiki/Thiazide
wikilink