It just takes the urls and convert it into the correct format. Either pretty one if you have it enabled OR non pretty one and saves it in cache file.
and it does this for 1st part of the url only. " | " is just the separator here.
modules/?r=name/view/|modules/?r=name/edit/|forum/name/|modules/?r=name/embed/
will be changed to
m/name/view/|modules/?r=name/edit/|forum/name/|modules/?r=name/embed/
if you have permalink enabled of course, otherwise its left like that. Other parts are saved too. To match against the page you're viewing and highlight that on menu, just what Nathon said^.
This is what i observed/guessed.
so much to do....