A drain was an exit point for liquids such as water in a plumbing system.
In 2285, after messing with the USS Excelsior's transwarp computer, Montgomery Scott remarked on the ease of sabotaging the complicated system, noting, "The more they over-think the plumbing, the easier it is to stop up the drain." (Star Trek III: The Search for Spock)