To copy your downloaded music to a CD, you will need:
Some files you wish to put on CD
Some blank CDs
CD-writer hardware
A package of CD-burning software. Windows Media Player and iTunes can both burn CDs; professional packages also exist, such as ImgBurn, Nero Burning ROM (not free, but free trial period) or Roxio Toast (Mac only, not free).
A program that can convert audio files between formats, such as Winamp (even though this is first and foremost a media playing program, it also functions as a conversion utility). iTunes also has this functionality - see here for further details.
For MP3s:
While you can in theory burn a CD of MP3 files, such discs are geared towards data storage rather than playback (ie they're best used as a backup of files). They are often incompatible with commercial CD players and car stereos - so if in doubt, it's probably best to convert the MP3 files into WAVs, which will enable you to burn a CD that will work with any player.
For FLACs:
Some programs can burn FLACs to CD; it's worth noting that Windows Media Player, at least, will not. Two programs that do support this are dBpoweramp (not free) and Burrrn. Alternatively, it's quite common to convert the files to WAV format first and then burn those to CD. Since FLAC and WAV are both lossless formats, you can freely convert back and forth between them as many times as you like with no loss of quality.