I am just wondering that how do I know if a user is a moderator or not? Is there any flag or mark so, I can determine that is user moderator?
All moderators have a diamond next to their name.
Additionally, if you go to the users page, there is a moderators tab that will tell you exactly who is a moderator.
For Meta StackOverflow:
The API has methods to fetch all moderators (includes employees) and elected moderators: