If you are looking to insert your own data into the vbulletin database, it is done with $db->query_write() commands - basically it's a wrapper function that you can pass your sql statements to. Like for instance, I have a custom mod that I'm using to highlight a given post - the syntax is simple:
Code:
$db->query_write("UPDATE ".TABLE_PREFIX."post SET highlight = 1 where postid in (".$postids.")")
It is very important that you properly escape your statements, and verify that any variables you are passing are valid. Not doing so leaves you wide open to a SQL Injection attack.