It isn't bbcode, really. It's a
regex replacement.
Simply put, it scans the post for "[[
something]]", (or the other version, the [[something
|something else]]) then replaces all instances of that with the URL bbcodes which then get parsed later on in the function. It's a fairly straightforward implementation.
So when it finds a post like [[fishing]] it will see replace the double brackets with [url]http://www.mabiguru.com/wiki/index.php?title=fishing[/url]. Then the [url] bbcode gets picked up by the forum code and turned into links like
http://www.mabiguru.com/wiki/index.php?title=fishing (as if it had been typed in directly).
I honestly can't really explain how it works short of pointing you to a couple regular expression tutorials :x