Get the user uid (uid) from comment id (cid) If I have the value of the comment id (cid) ex: 5

how do I get the user id (uid)?
You need to load the comment object:

$comment = comment_load($cid);
$uid = $comment-&gt;uid;