In the Middle Ages, people in Europe believed that Incubi (one Incubus, several Incubi) were male demons. There were also female demons, called succubi. They lay on sleeping people, to have sexual intercourse with them. They would also do this to make other incubi. While they had sex with their victim, they drained its energy to sustain themselves. Sometimes, having sex with an incubus may result in a child, as in the legend of Merlin. Some sources say that the incubus may be identified by its unnaturally cold penis. Religious tradition holds that repeated intercourse with such a spirit by either males or females may result in bad health, or even death.

Origins of the legends 
People have come up with different explanations for the incubus legends. In the Middle Ages, people worried a lot about sin, especially sexual sins of women. Victims may have been experiencing waking dreams or sleep paralysis. Also, nocturnal arousal, orgasm or nocturnal emission could be explained by the idea of creatures causing an otherwise guilt-producing and self-conscious behavior. The influence of incubi could also have been used to explain how pregnancies happen outside marriage; such pregnancies were often "unexplainable".and unnoticed 

Victims who claimed to have fallen prey to the influence of incubi, could in reality have been victims of sexual assault by a real person. Rapists may have attributed the rapes of sleeping women to demons in order to escape punishment. A friend or relative may have assaulted the victim in her sleep. The victims and, in some cases the clergy, may have found it easier to explain the attack as supernatural in origin rather than confront the idea that the attack came from a trusted person.

Ancient and religious descriptions 
One of the earliest mentions of an incubus comes from Mesopotamia on the Sumerian kings' list, ca. 2400, where the hero Gilgamesh's father is listed as Lilu (Lila). It is said that Lilu disturbs and seduces women in their sleep, while Lilitu, a female demon, appears to men in their erotic dreams. Two other demons appear as well: Ardat lili visits men by night and bears ghostly children from them. Irdu lili, is the male counterpart to Ardat lili. He visits women by night. These demons were originally storm demons. Because the etymology was interpreted wrongly, they were later seen as night demons. Also considered to be vampires which is another form of a demon that is said to drink blood from its victims.

Incubi and succubi were said by some not to be different sexes, but the same demon able to change its sex. A succubus would be able to sleep with a man and collect his sperm, and then transform into an incubus and use that seed on women. Their offspring were thought to be supernatural in many cases, even if the actual genetic material originally came from humans.

Many tales claim that the incubus is bisexual, but some indicate that it is strictly heterosexual and finds attacking a male victim either unpleasant or detrimental. There are also many stories involving the attempted exorcism of incubi or succubi who have taken refuge in the bodies of men or women.

Incubi are sometimes said to be able to conceive children. The half-human offspring of such a union is sometimes referred to as a cambion. The most famous legend of such a case includes that of Merlin, the famous wizard from Arthurian legend.

According to the Malleus Maleficarum, exorcism is one of the five ways to overcome the attacks of Incubi, the others being Sacramental Confession, the Sign of the Cross (or recital of the Angelic Salutation), moving the afflicted to another location, and by excommunication of the attacking entity, "which is perhaps the same as exorcism."  On the other hand, the Franciscan friar Ludovico Maria Sinistrari stated that incubi "do not obey exorcists, have no dread of exorcisms, show no reverence for holy things, at the approach of which they are not in the least overawed."

References 

Demons