Obsessive-compulsive disorder (OCD) very often has sexual obsessions of various types, which could include homophobia, deviant thoughts or obsessions, or simply just an obsession with sexual act(s) themselves.
The general condition of OCD involves unwanted obsessions that become upsetting or interfere with the person's life and personal interactions. These are usually followed by compulsions that are ways of acting out against those obsessions to relieve the stress they cause. So an obsession with cleanliness, germs, and disease could result in compulsions to clean bathrooms, wear protective medical gear, or otherwise alleviate the fear of germs.
With sexual obsessions, things can be a little more tricky. The obsession can include many things which society and our personal morals would consider very deviant. Repetitive sexual thoughts are common in neurological disorders, usually being dictated by the disorder in question regarding their content and meaning.
For those with OCD who are experiencing sexual obsessions, the most common trait is that the compulsion which follows in order to cope with the obsession will often be opposite of the obsession. For example, a person who is obsessed with anal sex and who continually thinks about it, but considers the act "deviant" or "wrong," will often feel compelled to commit non-anal sexual acts or studiously avoid sexual behavior entirely.
A common subset of sexual obsessions revolves around homosexual obsessive-compulsive disorder (HOCD), in which suffers have a deep fear that they, themselves, are homosexual or might become so (or, alternately, be wrongly perceived as being homosexual). A common coping mechanism is to be compulsively "ungay" while another is to compulsively view or witness homosexual acts to "prove" they aren't arousing.
Whatever the obsession, even if it's considered extremely deviant, it's not serious unless your compulsion compels you to carry out the deviant act. This is especially true if the act is illegal or harmful.
Proper treatment and counseling is the best way to deal with any type of OCD, sexual obsessions and HOCD included.