The simplest definition of a homosexual is a person who has attractions for members of his or her own sex: SSA. This is the meaning that the Vatican tends to use in Her documents on homosexuality, and it is the definition which most people assume when they hear the word. The word "homosexual" in this sense does present some problems: it assumes that people who engage in homosexuality have some sort of underlying sexual preference or inclination which directs their sexual behaviour. It assumes that a person who has gay sex does so because they are attracted to members of their own sex, and not for other reasons. The people of Sodom, for example, were probably not homosexual in this sense: their demand to have sex with the angels was probably not a manifestation of sexual attraction, but was more likely a form of ritual domination, or of politically organized violence designed to keep unwanted outsiders out of their city, to send a clear message to Abraham who was camped nearby with his men, and/or to exercise magical or religious power over potential enemies. Prison homosexuality, lesbianism in harems, and pederasty in single-sex boarding schools are other examples of homosexuality in which people are likely to practice homosexual sex without necessarily having any same-sex attraction. The term "homosexual" in this sense also tends to assume a bipolar sexuality in which people are either exclusively SSA, or exclusively OSA (opposite sex attracted), and it doesn't account for the fact that vast majority of SSA people have some degree of OSA as well.
A second possible definition, one that is fairly popular in contemporary discourse, is that a homosexual is a person who has an LGBTQ identity. A person who comes out of the closet as gay, is homosexual. That's straightforward enough. Certainly when studies or research into homosexuality are undertaken, the LGBTQ community is the primary focus -- both because it is incalculably easier to recruit people for studies when they are willing to identify themselves, and because people who identify as LGBTQ are more likely to access products and services which are directed towards a gay demographic. The problem with this definition is that it excludes all SSA people who, for one reason or another, do not want to identify themselves with the gay movement. Some people reject LGBTQ identities for religious or political reasons (Courage, Exodus and other Christian groups often explicitly discourage their members from identifying as gay, on the reasoning that it cements a link between personal identity and sexual sin, and that it may be a barrier to spiritual healing). Others reject LGBTQ identities because they reject gay culture, or because they have negative stereotypes associated with words like "gay" or "lesbian" that they feel do not apply to them. Still others reject an LGBTQ identity out of a feeling that labels are restrictive or artificial: they feel that their own sexuality cannot be adequately described or constrained by any of the available terms. Finally, SSA people may reject these identities because they want to keep their sexual preferences private, or because they don't feel that their sexual desires are an important part of their identity at all. On the other hand, people who are not SSA may identify as LGBTQ either because they wish to access gay culture and gay services, or because they feel non-sexual romantic attractions to members of their own sex, or because they experience some variant of gender-queerness without SSA, or because they routinely have sex with members of their own sex even though they do not have strong same-sex attractions. (This latter category might seem a bit bizarre, but think, for example, of the situation of an OSA woman who has been raped and is now too terrified to have sexual relationships with men, and who therefore seeks out lesbian encounters in which she employs heterosexual mental imagery during sex.)
Finally, a third definition of homosexual, also seemingly intuitive and straightforward, is "someone who has sexual relations with members of his/her own sex." The terms MSM (man who has sex with men) and WSW (woman who has sex with women) are often used in social studies research in order to precisely indicate this type of homosexual -- studies of HIV/AIDS, for example, will tend to focus on MSMs regardless of attractions or sexual identities because HIV is spread by behaviours, not by desires or labels. The problem with this definition is that it would exclude all successfully chaste SSA people from ministries directed at homosexuals, and it would exclude all non-sexually active (or exclusively heterosexually active) LGBTQ people from public services, anti-bullying strategies, political protections, etc. which are designed to help or protect sexual minorities. It also fails to address the problem, mentioned above, of opportunistic or ideologically motivated homosexual sex by heterosexual people.
The bottom line is that these three groups, SSA folks, LGBTQ people, and MSMs/WSWs, are all in some sense "homosexual," but they do not represent a homogeneous, or coterminous population. Any statement, study, or research about "homosexuals" must take this into account, it must resist the sloppy temptation to equivocate between these terms, to assume that statistical information or clinical observations of any one of these populations can be automatically applied to the others.