I take it that you've never used "wget" before then?
Basically, it works like a spidering program which downloads a page, follows links from that page and also alters the links in real time before it saves it to the hard disk.
Saving a web page (complete) in a web browser also works in the same way.