I don't want to say something stupid, but since noone else replied, i'll try my explanation:
First, you define a function onLoad which takes one argument - f. Then you set its public property loaded to false. This property signals, that the whole document has already been loaded. Then you call onLoad, passing another anonymous function as an argument.
That means, inside the call of onLoad, f becomes equal to this anonymous function, making it no longer anonymous in onLoad's scope. Therefore, setTimeout, addEventListener and attachEvent can reference it as f.
If you'd call onLoad another time with some different function as its argument, it would be added to setTimeout's queue with zero delay, which pretty much means invoked immediately.
I'd be happy, if anyone corrects any mistakes, i may have written.