fun fact: it is only illegal to consume alcohol in public or to be sold alcohol. it is legal for a minor to drink alcohol purchased by someone else in their own home.
That's basically the law in the UK.
You can only purchase alcohol at the age of 18. However I think shops are legally required to ID anyone who looks under 21, and many shops subscribe to a voluntary policy, Think25, where they ID anyone who looks under 25. (On a similar note, it's also illegal to challenge someone for ID and then sell them alcohol if they don't provide ID, even if you realise they clearly are a 65 year old man).
At 16/17 you can drink (but not buy) beer/cider/wine WITH a meal IF you're accompanied by an adult. You can't have an additional drink after your meal has finished.
Under 5-17 you can drink alcohol in a private residence. You can't purchase it however.
It is illegal to give alcohol to an under 5 year old.