What you were taught
Drinking coffee causes dehydration
What we know now
Moderate coffee intake does not dehydrate healthy adults who drink it regularly. Caffeine can briefly increase urine output, especially in large doses or after caffeine abstinence, but the water in coffee offsets that effect at typical intakes (roughly a few cups a day). A 2014 PLOS One crossover study found no difference in hydration markers between moderate coffee and water in men who already drank coffee daily. Earlier reviews reached the same broad conclusion for ordinary lifestyle caffeine use. Water is still the simplest hydration choice; coffee can still count toward daily fluid.
Updated understanding emerged around 2014