A wizard comes of age at 17, contrasting the muggle world at 18. You are allowed to do magic freely at this age, even if you are still attending school, and "the trace" (detecting all your spell work) if lifted from you. In the case of Harry Potter, the protection charm on his childhood home had to be lifted, although it's unknown if this occurs with all of similar cases. I don't think the drinking thing like in the muggle world occurs until 18. You have to be this age to be a seventh year at Hogwarts.