The tool you want is called dd ("data dumper"). It's a very generic tool for taking raw data from one place and putting it in another.
"man dd" will give you exhaustive information on its usage. In short, the way to create an image file from a CD is something like 'dd if=/dev/disk1 of=filename.iso'. This assumes that your CD drive is the second disk in your computer, which may very well not be the case. Running 'mount' (with no arguments) should show you which volume is tied to which device.
You should note, however, that "iso" means more than just an image of a CD; it also refers to the iso9660 filesystem. If you're using dd with a disc which is using this filesystem, you'll get what you expect. But if you dump the data from a disc containing, say, an hfs+ filesystem, you'll get an image of an hfs+ filesystem.