read the cd writer how-to on linuxdoc.org
for getting your writer working and on how to burn stuff to a cd. Provided you cd writer is supported then you can do it but via the command line is not the easiest thing to do.
You will need to make an image of the files that you want to put on and then use another program to do the actual buring.
it is easier if your cd writer is a scsi one of some description and your kernel has the requisite bits configured into it. If it is the stock kernel from your distro then you should just have to load some modules in and you'll be away otherwise you'll have to recompile your kernel.