It seems that for some unknown reason, your iPhone keeps a record of every cell tower that it’s ever talked to, and this data is marked with the current time (accurate to the second) and the latitude and longitude of the location.
In other words, it’s quite literally tracking everywhere you’ve been with your iPhone turned on.
You can download the open source app from here:
It browses the SQLite database that contains this information and draws it on a map. This will show pretty clearly everywhere you’ve been for quite some time.