this structure is used to call methods and fields from a certain class.
in this case there's an object (in the variable $vbulletin) or a certain class. That class has a field named 'db', which is an object itself. The db object has method query_first. So now you're calling the method query_first of the db object that is a field of the $vbulletin object
here's a small example:
Hope this makes it a little clearer, if not, let me know
UnrealEd