You need to change this statement:
 $result = $xoopsDB->queryF("SELECT id, name FROM ".$xoopsDB->prefix("dictionary")."  WHERE state='O' order by id desc LIMIT 0, $numDef");  
This is now ordered by id number backwards (desc) and this mean the latest ones.
For random it is easy:
 $result = $xoopsDB->queryF("SELECT id, name FROM ".$xoopsDB->prefix("dictionary")."  WHERE state='O' order by RAND() LIMIT 0, $numDef");  
For requested you have to know which field is used in the table to indicate that. Supposing it is when state = 1 then you have:
 $result = $xoopsDB->queryF("SELECT id, name FROM ".$xoopsDB->prefix("dictionary")."  WHERE state='1' order by id desc LIMIT 0, $numDef");  
If it is another field eg. named req and with 1 in it then it would be:
 $result = $xoopsDB->queryF("SELECT id, name FROM ".$xoopsDB->prefix("dictionary")."  WHERE state='O' AND req = '1' order by id desc LIMIT 0, $numDef");  
For popularity you have to know which field has the number of views or something and then you order on it:
 $result = $xoopsDB->queryF("SELECT id, name FROM ".$xoopsDB->prefix("dictionary")."  WHERE state='O' order by views desc LIMIT 0, $numDef");  
I don't know the module and what is in the database, so you have to have a peek with phpMyAdmin (browse).
There you can also test your adapted SQL statements:
 SELECT id, name FROM yourxoopsprefix_dictionary WHERE state='O' order by id desc LIMIT 0, 10);  
(yourxoopsprefix is to be modified to the real used prefix of your database)