It's building the data set using two main sources of info. You know those Apple Maps vans (and now drones) that have been roaming around for years? They've been contributing to the new Maps all along, and use "beefed up" GPS, LiDAR, camera arrays and a physical measuring tool to generate both positional data as well as a 3D map that can categorize objects like signs, traffic lanes and buildings. Higher-resolution satellite images help as well, and Apple can more vividly describe content like vegetation, foot paths and (new to Maps) swimming pools. However, Apple is also generating map info using the iPhone in your pocket. It's using passive Maps vector data from every iPhone to provide representations of both road and pedestrian traffic. It promises much improved real-time traffic data, not to mention clearer indications of when construction or walkway changes have taken place.
Apple is promising that these methods won't impinge on your privacy. Its own data collection workflow is designed to be sure that data gatherers only ever see "sanitized" data without sensitive info, while the iPhone collection is completely anonymized to the point where Apple can't even identify a specific trip, let alone users. And in case you're wondering: no, this won't eat into your battery life.
On top of all this, Apple has been creating new tools to help human editors quickly interpret and make changes to data. In addition to allowing for faster corrections, this lets them add specific access points (say, a driveway or building entrance) and edit the geometries of specific buildings, such as recognizable skyscrapers. The team has even produced replicas of road signs, licensed fonts for mass transit systems and put line numbers in the same order as you'd see them at the station.
You'll first see the new Maps data in service next week with the next iOS 12 beta, although it will only cover the San Francisco Bay Area at first and will extend to Northern California by the fall. The new data will soon be available in every version of iOS that uses Maps, though, and there's no doubt that Apple eventually plans much wider coverage. It could be a long time before you can regularly take advantage of the new map data, but the very fact that it exists is important -- it's an acknowledgment that Apple needs to make Maps a higher priority if it's going to give you a better reason to skip Google's offering.