I think in part it's just picking up signals from people, their body language, etc. Also there's things like if someone uses neutral pronouns or just avoids using them, they instead of he or she,or says things like 'I went out with a friend, we went shopping, my friend loves to shop, then we went to a movie, they really love horror movies.' When it'd be easier to say he loves to shop, he loves horror movies...or if someone just completely avoids conversations like that, that always makes me wonder.
Also I think who someone watches when they think no one's paying attention or that no one can see them, is sometimes a giveaway. My gaydar has pinged a few times when guys who've thought they were out of sight have watched a nice (male) ass walk by...I think it's the little things like that that make up 'gaydar'. And I think anyone could spot them if they paid attention, it's why some straight people can pick up on it too, but I think gay men spot them easier because they're used to doing those things themselves...
I dunno, that's just my opinion