There was a time in the late '90s where anyone looking to download songs was probably looking to do so illegally. Downloading music became popular with fans because many Internet file-sharing programs allowed fans to download songs. The most notorious of these, Napster, was shut down after a series of lawsuits were filed by the Recording Industry Association of America (RIAA).
After shutting down Napster as a portal for free music downloads, the RIAA began suing individuals who downloaded free music from file-sharing programs. The RIAA successfully sued Jammie Thomas. The verdict against Thomas was overturned by an appeals court judge in September 2008. The RIAA is appealing that judge's decision.
Now, the #1 music retailer in America is iTunes and all songs, movies, and videos sold through iTunes are downloaded. There are now many legitimate services that allow customers to download songs in addition to iTunes, most prominently Amazon.