The GPS isn't used very often. The compass works out which way the car is facing, so it can calculate in which direction you are travelling along the road.
The system keeps track of how far the car has journeyed down the road by measuring the distance travelled. The normal cable-driven odometer is not accurate enough for this purpose so the system uses the magnets in the anti-lock braking system to measure the revolution of the wheels. This needs careful calibration but can still be fooled. Tyre wear can fool the system - but only until you make the next turn. When this happens, the computer checks to see where you are likely to be - it's only going to be a few yards out - and resets the position. The result of all this is a car which always knows where to go.