Having music on your computer is not illegal.
Downloading your CD's on your own computer is not illegal (it's considered a "Back-up copy".
Downloading music to your computer is not illegal if you paid for it or if it is freely distributed by the artist or record company.
Letting others download music from your computer is illegal! That is where they get ya.