@jessica Listen, I don't want to argue with you but you are asking some basic questions when it clearly states what $db is in the function.
$db = Core::getInstanse(); Is clearly a call to the database for login and setup for querying.
If you don't know what the code below is and how it is used you don't know PDO because you wouldn't have asked what execute() means.
$ststres = $db->dbh->prepare("SELECT * FROM ".USERS_STATS." WHERE user_id = :uID ORDER BY id DESC LIMIT :zero, :forty");
$ststres->bindParam(':uID',$udata['id'],PDO::PARAM_INT);
$ststres->bindValue(':zero',0,PDO::PARAM_INT);
$ststres->bindValue(':forty',40,PDO::PARAM_INT);
$ststres->execute();
It is clear that I am passing the results from $ststres into the Smarty call which I showed you what the var_dump results were to be passed.