Hugging a guy is considered haram in Islam if the hugger and huggee are not mahram (related in a way that prohibits marriage).
This means that hugging a guy who is not your father, brother, uncle, or other close male relative is forbidden.
It is important to remember that religious interpretations vary. Some Muslims may consider hugging a guy friend permissible if both parties feel comfortable with it, while others may strictly adhere to the prohibition of physical contact between men and women outside of marriage.
It is always best to consult with a qualified Islamic scholar for guidance on such matters.