To take a leak is to urinate. This is predominantly a male-oriented slang phrase. It joins the phrase "take a dump" (defecation) in the category of phrases that make no sense - where would you take it? Wouldn't you prefer to leave it? For this reason, some wiseacres prefer to utilize other substitutes such as "spring a leak" - since that's what it is typically called when a leak begins.
The politeness of this phrase falls somewhere between announcing that you need to urinate, and claiming that you need to "piss" — alternatively, "take a piss".