The quick and dirty way is to simply copy the device file using dd:
"dd if=/dev/cdrom of=filename.iso"
If you need more features, like error recovery, use mkisofs:
"mkisofs -r -o filename.iso /dev/cdrom"
The image file can then be burned to a CDR using "cdrecord" or mounted as a loopback device.