How is tax calculated on lottery winnings?

In the UK there is no tax to pay on lottery winnings, although the govenment do take tax before the prize fund before any winnings are paid.