A 19-year-old student was able to escape the jaws of a shark after it bit his legs while he surfed off the coast of California.