I drink city water, city has lead pipe, how is this safe?
In light of the recent events in Flint Michigan, this issue has come to the forefront (see this article from the American Chemical Society's Chemical  &amp; Engineering News and see this article). To summarize:

Active Measures to prevent lead corrosion:


Maintain high pH. This makes lead carbonates less soluble in water.
Add orthophosphates which create relatively insoluble layer on the inside of the pipes.


Without these treatments, the addition of chloride disinfectants aggravates the corrosion problem by forming lead (II) chlorides (which is water soluble).

As mentioned by Jaroslav, the time that water sits in the system also plays a factor.