How to get the Role of a user not logged in?

Why would they have a random ID? I have already queried the site members database and got the ID I want. Now I just want to see for that ID, which roles have been assigned to it.

Is there any way to do that?