There are several tools for it.
The easiest is to get a friend who use linux, and enter this command into a terminal:
For DVD's:
dd if=/dev/dvd of=myGameDisk.iso
For CD's
dd if=/dev/cdrom of=myGameDisk.iso
There are several programs for windows to do this too, but most of them cost, I used to use isobuster, it worked great, and I'm sure it's still a great tool.
Alcohol 120% is also a VERY good tool, but it's also not free.
Also, many new disks are copy protected, and it might not be possible to make an exact copy that the game will recognize, the easiest way around this is to download a so-called "nocd" patch/crack for the game. This is perfectly legal to do when you have the original game.
People shouldn't be punished for buying their games original.