With the exception of the Tantric tradition most Buddhist schools take a cautious attitude to all expressions of sexuality. The Buddha’s teachings on the subject are summed up in the third Precept which requires one to avoid sexual misconduct (kamesu micchacara). This somewhat vague term has been interpreted differently but it is probably best to understand it to mean that one should not sexually exploit another. This would include rape, adultery (which takes advantage of a spouses trust), sex with the intellectually, economically or psychologically disadvantaged and promiscuity.
The Buddha did not teach that celibacy is necessary for enlightenment but he did see it as being very helpful. Constantly pandering to sexual desires agitates the mind, provokes frustration and can even become a preoccupation thus distracting one’s energies from the spiritual quest. Clearly, his attitude to sex was not based on the idea that it is ‘dirty’, ‘immoral’ or ‘evil’ but on an assessment of its impact on the mind and its utility to the spiritual quest.
Tantric Buddhism, at least as it was sometimes practised in India, took a very different attitude to sex, teaching that the power of sexual passion could actually be used to attain enlightenment. Some Tantric text like the Guhyasamaja Tantra glorify the most extreme licence as proof of freedom from all conventions and discriminations.