$sql = "SELECT c.cat_id, c.cat_title, c.cat_order
FROM " . CATEGORIES_TABLE . " c
ORDER BY c.cat_order";
This line sets up a MySQL query. In PHP, you should note that $sql is the variable, the = sign tells it to set a new value, and that the ". CATEGORIES_TABLE ." is concatenating (appending) a constant with the rest of the string.
if( !($result = $db->sql_query($sql)) ) {
If, for any reason, $result cannot be made by running $db->sql_query() with the above query...
die('blah blah blah');
Print out an error message and kill the page.
while( $category_rows[] = $db->sql_fetchrow($result) );
This line actually has a parse error in it. However, the while (a form of a loop) is being run in which the next open space ($category_rows[] would be like [man]array_push/maning something onto the end) is the next row retrieved from the database.
$db->sql_freeresult($result);
And finally, free the rows to save memory.
That is, assuming the names of the functions are representative of what they do. There's some class in here (hence the pointer (->)--check out [man]language.oop[/man] for more) that I don't know about, so I can't give terribly in-depth information.
Hope that helps.