HOCD is a form of obsessive compulsive disorder that deals with one's sexual identity. It's based around the fear that one might become or somehow is homosexual, with this notion going against all rational and actuality of that person's sexual identity as a heterosexual. In part, the fears are that of impulse and loss of control, where one feels overwhelming anxiety around the intrusive thoughts of being sexual and passionate with another member of the same sex.
This is not at all the same as closeted gays who may be afraid of social repercussions. It is not a fear of rejection by members of the same sex, but rather is a fear of the attraction itself. Healthy homosexuality and heterosexuality are based around positive feelings, whereas the feelings encompassing HOCD are quite negative and do not revolve around wholesome fulfillment. Instead, they are based around insecurities and the mind playing off these insecurities to falsify reality to the afflicted person. The person will feel an urge of sorts that just "doesnt fit" with themselves, and it causes utmost anxiety, confusion, frustration, and pain. However, the urge/thought does not go away and the anxiety persists, leading to illogical rationalization and depression, among many other negative side-effects stemming from being afflicted with the intrusive thoughts.
For those unsure about what this feels like, imagine getting the impulse to jump off a cliff. You're standing at the edge, and your body and mind scream out "no!!!" but the impulse almost convinces yourself that you want to do it. You have control over yourself, and you may hastily step back from the edge of the cliff, but might for a few minutes be scared and confused as to why you even had the impulse. This "impulse fear" is what drives the confusion in all obsessive compulsive behaviors, and is quite apparent in HOCD as well. The disorder comes with the thought of the impulse being persistent and intrusive, and not being easily dismissed by the obsessive mind. Instead of just being there, it serves to try to convince the person that maybe he did want to jump off the cliff, and maybe that is some actual reality for him. This does not fit with who the person is, and it causes confusion and mental disaster.
HOCD manifests as an emotional "spike" at the sight of an attractive member of the same sex, and then ponder in confusion whether or not he found that person to be sexually attractive. This will be followed by thoughts of doing things sexual with that person, which furthers the anxiety, possibly resulting in compulsive and repetitive "checking" that manifests itself in many ways.