this is done automatically by php. by defaults, if you request a script like "site.php?id=site", the script can directly access a variable named $id which contains the string "site".
however, there are other ways, too, eg. via the $HTTP_POST_VARS array.