Exec simply runs a command on the system.
A simple way to see what works and what doesn't is to open the command line on the operating system.
On windows, you can access the command line by hitting the windows key + 'R', then typing 'cmd' and hitting enter - that'll open up command prompt.
On Linux it depends on your distro, but assuming you're using one with the default Gnome menu, it'll usually be under 'Applications' : 'Accessories' : 'Terminal'.
PHP's exec function simulates you typing the command into that terminal.