The legal definition of rape is the penetration, with a penis, of the vagina, anus or mouth of another person where consent has not been given.
The difference between having sex and being raped is a matter of consent. If one person has not explicitly said yes to having sex or is unable to make that choice because of their age or because they do not have capacity for any reason, including drugs and alcohol, then it is rape.
A common myth is that rape is generally perpetrated by a stranger. The truth is that most rape victims know the perpetrator and in some cases it is their partner.
Another myth is that it is not rape if you did not fight back; this is not true. There are many reasons why people do not, or cannot, fight back; it is still rape.
Where there is an allegation of rape, firstly the prosecutors must take into account whether the victim had the capacity to consent; for example if they had been using drugs or alcohol or if they had been threatened, they are unlikely to be in a position to make a free choice. Prosecutors will try and establish what steps the suspect used to try and gain consent. If there is any doubt, then they are likely to be given a custodial sentence.
Sentences can vary, depending on the circumstances, but may be anything from a few years up to life imprisonment.