Drinking in a public place is not, in general, illegal. (The only exception, in relation to public beaches, might be where there are specific bye-laws covering just that local authority area).
However, local authorities have the powers to make a 'Designated Public Places Order' to create a 'Drinking Control Area'. Many coastal resorts now have such orders in place, which usually include the beach and the seafront (and, quite often, the town centre as well).
Even when you're in a Drinking Control Area, it's still not an offence simply to consume alcohol. However, if a police officer tells you to stop doing so, it's then an offence to continue drinking. If the officer also tells you to hand over your booze, it's also an offence to fail to do so. (In practice, the police usually require revellers to tip their alcohol down the drain, or into the sea. That's to prove that the police won't drink your confiscated booze later on!).
In areas where there are well-known problems with people drinking in public (e.g. on the seafront at Southend-on-Sea), the police will often be quite quick to stop people drinking. However, in areas where there's no history of trouble (e.g. on an isolated area of a beach in Wales), the police will usually ignore people drinking on a beach unless things seem to be getting out of hand. (Indeed, that's what the law expects them to do. The whole point of the legislation is to permit people to enjoy a few drinks, without being criminalised, unless there's a need for the police to call a halt to the drinking).
Chris