How does Google Maps work?
Google has the most widely used mapping service for a reason
Google has the most widely used mapping service for a reason: it has the largest number of "sensors" on the roads, and these supply it with ample data.
These sensors are, of course, our smartphones. All Android phones that have location services turned on and iPhones that have Google Maps open send anonymous data back to Google. This helps it determine the flow of traffic.
Google adds this real-time data to traffic data that it has collected over the years. The combination should give users the fastest route from A to B.