If you go to Google and search for "test" you'll see the url looks something like this:
http://www.google.co.uk/search?hl=en&safe=off&q=test&btnG=Search&meta=
Optionally, you can get rid of the useless bits to leave:
http://www.google.co.uk/search?q=test
So what you've got is a call to a program called search with a parameter called q which tells it what to search for.
If you choose Link to a file or website from the Add Resource menu then you can put the url in the location field as:
http://www.google.co.uk/search
and then hit the show settings button next to parameters, and from the dropdown menu choose (e.g.) surname and in the variable name box next to it put q.
When a user accessesses this resource they will not go to the url you typed in but instead be sent to a slightly longer, Moodle-generated url based on their own user details, for example:
http://www.google.co.uk/search?q=Redmond
I hope that helps, it's a bit complex if you're not used to messing with URLs but it's a relatively simple yet very powerful way of connecting two web applications together, once you get the hang of it.