Basically, what happens is that the server identifies a URL that needs redirecting elsewhere, and sends a "document moved to new location" HTTP response back to the browser, which contains the new URL. The browser then goes and gets the new URL.
Thanks!
-- Andrey Andreev University of Helsinki Dept. of Computer Science