The Animal Welfare Act 2006 defines this. It raised the minimum age for buying a pet from 12 to 16. Under-16s are not able to win a pet as a prize.
You must be over 16 to own a pet in England and Wales. This is also the case in Scotland.
Even if you are over 16, you will need a licence to earn certain kinds of pets. You can find out more about owning exotic or wild animals here.