Here is a very good beginning tutorial->
http://www.fluidthoughts.com/howto/mod_rewrite/
Not to mention Apache's own somewhat complicated documents:
http://httpd.apache.org/docs/mod/mod_rewrite.html and
http://httpd.apache.org/docs/misc/rewriteguide.html
Or if you don't feel like reading/learning then just cut-and-paste this into your config file (This could be httpd.conf or commonhttpd.conf or a directory specific .htaccess file)
RewriteEngine on
RewriteRule /(.+)$ /{SERVER_PATH_TO_WEBROOT}/script.php?var=$1
That will take anything after the slash, represented by the "(.+)", and squirt it into script.php as variable $var.
Let me know if you have trouble.
Cheers...