It does two things.
Holistic path planning uses the entire scene to identify the lane, not just the lane markings.[1] This is exactly how a human drives on a rural road.
Once enough fleet learning data is gathered, high resolution maps will mark out the road surface to high accuracy (cm).
Of course that's no good unless the car knows where it is within cm! For this Tesla uses sensor fusion with GPS, an onboard IMU (similar to a smartphone), four wheel wheel odometry (via the ABS sensors), steering angle, and torque delivery. Owners report that the Autopilot 1.0 cars know their position in a parking space to within about 10 cm. And it has demonstrated high accuracy and low drift in no-GPS situations[2].
This type of sensor fusion (Kalman filtering) was originally developed for the Apollo spacecraft, and was one of the responsibilities of the famed Apollo Guidance Computer.
[1] http://wccftech.com/tesla-autopilot-story-in-depth-technolog...
[2] http://motherboard.vice.com/read/how-teslas-model-s-tracks-y...