Apple Maps uses machine learning to gather traffic data from various sources and analyze it to identify patterns and trends. This allows for accurate traffic predictions and optimized route suggestions based on real-time data.