The correct syntax is:
You have the script you want to send data to, then a question mark, then a series of key/value pairs, with the value name on the left of the equals sign, and the value itself on the right. These pairs are separated by the ampersand (&) character.
So the above example is sending the value called foo ('hello') and the value called bar (42) to the script somescript.php.
Then in somescript.php, the data is accessible via the $_GET superglobal:
echo $_GET['foo']; // outputs 'hello'
echo $_GET['bar']; // outputs '42'