Downloading music being illegal depends on the music you download, and where you get it from.
If the music you download is from an artist who has not got a label or contract and you perhaps download from the artists own web site (where they make their music available for free) then that is fine.
Or if you download the music from a web site where you pay for the music (like iTunes or Amazon) then that is also fine.
But if you download it from a "dodgy" web site then that is illegal.