Moderators are nominated/chosen based on their activity, kindness, respect for the rules, responsibility, and knowledge of how the forum works.
Additionally, if you aren't sure who is a moderator, it's really easy to tell. Look at the bar to the side of my post. You see where it shows my username, avatar, and post count? Well, around that area, you'll see a bunch of blue stars. That means I'm the head Moderator around here. Other moderators have red stars in their side profile. So, just look for those colored stars if you're unsure.