The syntax is:
stsadm -o restore -url http://destinationsiteurl/ -filename backupfilename.bak
where 'destinationsiteurl' is the url of the location you want to restore to and 'backupfilename.bak' is the name of the backup file you are restoring from. For example if your backup file was called site1.bak the syntax would be
stsadm -o restore -url http://server2/site2/ -filename site1.bak
If you get a message saying that the destination site already exists you have to add the -overwrite qualifier eg
stsadm -o restore -overwrite -url http://server2/site2/ -filename site1.bak
There's a great write up on this functionality as well as the GUI backup and restore here.
The full list of properties and methods for stsadm is at Microsoft here.