Apple has integrated this malicious behavior into iOS 4 and its so dirty that it takes automatic backups every time it’s connected to iTunes, then pulls out a lifelong list of your locations, timestamps included. This data can be visualized using iPhoneTracker, showing you complete location history.
Apple uses Cellular tower triangulation and that’s why it always works no matter your GPS is off or out of range. This location data is available to any person (or app) that knows where to look.
How to Disable iPhone location Tracking
Thanks to the Jailbroken app in Cydia, its now possible to escape this apple’s blunder. The app is called “Untrackerd” and it continuously watches and deletes the database that is used by apple to store location data. The app is available for free on Cydia under BigBoss repository, simply search for Untrackerd on Cydia and install it to prevent your iPhone from tracking your location.
The package [will install a] daemon (process that can run in the background) to clean consolidated.db file. No new icons are added to your homescreen. There are no options to configure.
Read more about how to Jailbreak your iPhone: http://geeknizer.com/untethered-jailbreak-ios-4-3-2-iphone-ipad-ipod-touch