The vB_Database class (Usually $db, $vbulletin->db or $this->registry->db) instead of the raw functions, because it will automate a lot of the tedious work like error checking. It also abstracts the functions away, so if you were to switch database engines (within the same syntax) it would call the approriate functions based on your configuration.
The plugin/hook system is pretty simple. Each "hook" is a spot in the code where you can inject your own code (a "plugin"). The plugin code is eval()'d at the hook spot, so all the nearby code is in scope. Why? So admins and add-on developers can modify vB or create new features without having to edit files. When upgrades come around, you don't want to have too many file edits.