Where the data comes from
Users participating in direct feedback through the API as well as many ISP's have the biggest influence on the database. We also rely on feedback from this website, when people identify their location and it is stored in the DB and associated with the /24 they are currently using.
The city data comes from various places around the 'net as well as from a major data donation. Some US data is from the US census data, other countries from other sources on the internet.
How much data there is
The database is organised as a 256 by 256 by 256 cube which correspond to the top-3 bytes of the IP address space (commonly called a /24 since it takes 24 bits to hold 3 bytes). Each point in the cube can hold a city. There are currently some 7 million or so points to map... it'll take a while [grin].
Yes, we like to have fun too ;)