You've probably heard people talk about 'gaydar' or being able to tell if someone is gay from their body language. While this could be true to some extent, it's not a sure thing. Some gay people don't exhibit any of the stereotypical signs and can be very straight acting. On the other hand, some gay people are very open about their sexual orientation and can be quite flirtatious.
Often, you may notice that your friend seems to have a crush on another man or woman. They will smile warmly and make eye contact with those they like and will also compliment them a lot more than they do with women. This is one of the most common signs that your friend is gay or bisexual.
Some guys may not want to talk about their sexuality as they think it makes them less masculine or macho. They may try to hide their interest in men or women or even avoid hanging out with friends of the opposite sex. They might also avoid reading any news or books that deal with homosexuality.
Some guys might also get snappy or rude if you mention their sexuality or if they hear you say the word gay or lesbian. This is usually because they are repressed and they haven't accepted their sexuality yet. It's not a good idea to force them into coming out. You should also not bombard them with personal questions. It's important that they have time to figure out their sexuality and that they can take their time.