Tesla uses the Mobileye eyeQ3 chip which decodes the video camera scene. It uses a static "deep learning" network (aka sophisticated neural network) to interpret the visual scene into cars, pedestrians, curbs, lane markings and other things. Tesla takes this information and then layers on top of it their own proprietary high resolution GPS map.
Near as we can tell (best info has been from the Elon closed conference call with reporters about Autopilot), Tesla gathers GPS paths from the entire Tesla fleet, does some processing on the paths and thus creates very accurate lane maps, such that they know the center point of each lane on a multi lane freeway.
So the Tesla lane keeping system uses both Mobileye visual scene decoding and Tesla high resolution GPS maps blended in some unknown way. We do know that the map information seems to update fairly rapidly unlike Mobileye which is static, doesn't change.
So far in the car industry, Tesla is the only manufacturer that has developed a system that allows the cars to learn from driver input, and learn fairly rapidly. This is a huge advantage, and will allow Tesla to remain the Autopilot leader forever unless other car manufacturers (or Mobileye) decide to do this too. But since no one else has even talked about having a car as connected as Tesla, I'm not holding my breath on the rest of the industry catching up anytime soon.