A teenage boy has been airlifted to hospital with serious injuries after he dove from a wharf at a popular beach.