Roton -
The nav system has a GPS, but this is not sufficient. GPS's go out of coverage when you're in between buildings, in tunnels, etc. So the nav system combines GPS input with input from the wheel sensors. Thus even if you go out of coverage for a few moments, the system knows you're still moving at 40mph, and knows if you just made a right turn.
The CPU compares the position the GPS provides with the latitude and longitude of streets in the map database, which is supplied by a company called NavTech and is on a CD-ROM which you insert in its own dedicated player in the trunk. Note that map data isn't always accurate, but the computer also uses the "dead reckoning" info to correct - for example, the GPS might say you're exactly half way in between 1st and 2nd avenues - but that is impossible - you must be on 1st or 2nd. So the computer makes an educated guess. Because it knew which road you were on last, and which way you turned, etc, it IS almost always right. Frankly, I'm amazed it works as well as it does.
The quality of the map data varies from city to city, and is responsible for some of peoples' complaints. But to the best of my knowledge, almost all the nav systems on the market use the NavTech data.