Gaydar is easiest when the person is attempting to project the fact that they are gay. They are telling a story with their body language, speech patterns, clothing, and as long as you speak the same language, the message of the story is clear.
Gaydar also involves reading who they are attracted to. Observing how they look at men, or if you are a man, observing how they look at you. My gaydar often involves giving guys "the look" and judging their reaction.
Thirdly, if you are looking for closeted guys, sometimes it is easy to tell if someone is hiding something. You might look for guilt, or defensiveness when gay topics are brought up.
So yes, gaydar is a real thing, its not 100%, but can be effective enough to help gay men find each other. The best way to find out if someone is gay, will always be to just ask.