According to Wikipedia, the third precept says:
I undertake the training rule to avoid sexual misconduct.
What sort of "misconduct" is this referring to?
This isn't strictly a historical question, but the mods allowed it and even directed me here, so...
There both are and are not specific types of "misconduct" referred to in the phrase "sexual misconduct." In order to analyze when it is and is not ok to get your freak on, let's break down some concepts in Buddhism: Types of Buddhists, Types of Vows, and how to interpret actions based on the previous two.
Types of Buddhists
Basically, there's four types of Buddhists: bhikkhu, bhikshuni, upasaka, and upasika.^1 The first two are male and female monastics, the latter two are male and female lay-followers. Monastics, i.e. monks and nuns, do not (as popularly predicted) spend most of their time meditating. It depends entirely on the tradition, on their job in the monastery, the type of education they receive, and what the monastic establishment needs at the time.
Lay-followers are everyone else. They are Buddhists, so it implies they have taken refuge with a Buddhist teacher, but they are only expected to adhere to the Five Precepts (though it should be noted that there are additional Precepts that one can take if one wants to advance their spiritual practice).
The Precepts are the Buddhist equivalent of the Ten Commandments. Which implies that there is a much more strict, much more descriptive, and much more rigid law to adhere to...
Types of Vows
Taking refuge in a teacher isn't a very strict ordeal. All Buddhists are expected to do this (arguably, you aren't a Buddhist if you don't do so). I'm not 100% sure the Five Precepts among lay-followers qualify as the legal definition of a vow (since nothing really happens if you break them, they're spiritual guidelines...).
The vows that monks take, however, are very much legally binding vows. Taking human life or having sex with a woman are the two worst offenses, and will get you banned from the Sangha should they be found out (though they're not the only offenses). While upasaka and upasika are expected to uphold the Five Precepts, monastics have literally hundreds of specific rules to follow as a part of their vows. Depending on the tradition, monks have 211-253 separate vows, while nuns have 311-364.^2
Under very unique circumstances, vows can be amended before taken, or certain ones dropped entirely. The vow against committing sexual misconduct, for example, becomes a full-on vow of celibacy when talking about monks and nuns, buuut there are still temples all over the Buddhist world that are passed down along a hereditary line. As is (quite literally) tradition. The Sakya and Nyingma schools of Tibet and Bhutan, to give but one example, are quite famous in this regard.^3 No one is looking the other direction while the Khenpo goes out for some action, no. In these circumstances, the abbot will usually refrain entirely, or simply wait to take this vow in particular, while still observing the rest of the vows.
Two of the most famous examples of this (and of it going horribly wrong) were in 17th Century Bhutan. Ralung, the temple that serves as the source and base of Drukpa Kagyu teachings, had been overtaken by Tibetans, so the Drukpa hierarchs moved to Bhutan.^4 Ralung had been passed down a hereditary lineage, and Ngawang Namgyal, the Zhabdrung, had intended to pass down his new found Princedom of Bhutan along a hereditary lineage. He had one son - Jampal Dorji - and considering this a job well done, he took a vow of celibacy which gave him a legitimacy boost ("Wow! We're ruled by a real, full, monastic!").
Well, one son wasn't much of an investment. Jampal Dorji had (allegedly, historical diagnosis is limited at best) a stroke and the Zhabdrung's only granddaughter died at five years old. The Zhabdrung, at least until his granddaughter's death, was still a healthy man and some advised him to take back his vow of celibacy so he might work at producing an heir. The Zhabdrung never did, his hold on Bhutan being tenuous enough without an added hypocrisy. And died, with only a crippled son and his realm on a dangerous crisis of legitimacy.
Luckily, the Zhabdrung had a young, capable, nephew in the monk Tenzin Rabgye. Tenzin Rabgye, like his uncle, didn't take his vow of celibacy and was pushed to produce an heir, with monastic officials going out of their way to bring him... ahem, willing vessels. Unlike his uncle, Tenzin Rabgye (builder of the famous Taktsang Monastery, among many other incredible pieces of architecture in Bhutan) never sired an heir, so presumably never ended up taking his vow of celibacy either.
But that's more of a legal issue, and less of an interpretation of the law. Tenzin Rabgye and Ngawang Namgyal couldn't commit sexual misconduct because they haven't vowed not to...
Interpretations
The Fifth Precept warns against the taking of intoxicants. Many versions (and I assume in the original languages, since I don't read or speak Pali or Chinese, I can't know for certain) use some verion of the term "drink" when referencing the word we typically use for "intoxicants" in English.
Since I'm unfamiliar with a primary source, I can only note that the Tibetan version of this precept must be similar. Tibetan monks are not unknown to drink a moderate amount as a method of keeping warm in some of the more remote temples, or for the conducting of certain rituals (most carried over from Pre-Buddhist Tibetan traditions). However, Tibetan Buddhism has a very strict definition of what qualifies as clean air. Bhutan is notable for being the first modern country to ban smoking^5, and while marijuana is native flora, it's considered de-purifying.^6
In Southeast Asia, the situation is entirely reversed: monastics wouldn't dream of touching alcohol, while they seem to be free to smoke wherever they want.
My point here is to illustrate that culture is entirely what determines what is acceptable conduct and misconduct.
In the realms of sexuality, the Pratimoksha (the Vinaya rules for monastic conduct) include specific refrains from sexual activity.^7 The formula for monastic conduct seems to be:
Monk does X.
Lay-follower sees monk doing X. Complains to the Buddha.
Buddha gathers the Sangha. They talk.
Buddha bans X.
This happens over and over in the Pratimoksha. The Buddha bans sex. Sex with prostitutes. Sex with men. Bestiality. Oral sex. Outercourse. (And lots of non-sexual items as well: handling money, dancing, wearing common colors, etc.) Notably, the Buddha seems to have left a hole (my guess is not on purpose) in the Pratimoksha, and did not ban intercrural sex, non-penetrative sex using a partner's thighs. This has unfortunately led to a lot of abuse regarding this loophole that obviously shouldn't be there.^8
But just, what about, for example, homosexuality? The Buddha banned sex with women for monks (fairly reasonable) should monks have sex with other monks? Is that homophobic? What about non-monks? It's very important to remember that if you're not a monk, it's not imperative to hold yourself to monk standards!
In 1999^9 the Dalai Lama gave a speech to Tibetans in India warning them against practicing homosexuality. Was he just trying to boost Tibetan numbers in the face of Chinese population expansion? Or was he being homophobic? His (white American) Buddhist followers in San Francisco felt rather betrayed by this. Hadn't they been welcoming to His Holiness? Hadn't they been good hosts, loyal Buddhists, and devoted to the cause of Tibetan independence? His Holiness had never portrayed any hatred or bigotry to San Franciscans... why now was this coming out?
The Dalai Lama was as confused as the San Franciscans were. He flew to California to clarify his position: he was a Tibetan, who came from an old, traditional society that valued procreation above all other sexual conduct. That doesn't mean he doesn't support rights for all people, or that people shouldn't be free to love whomever they do. He is a Conservative Tibetan for the sake of preserving his country's traditions, and that role should not be forgotten even as he is more accepted among the wider world.^10
I could probably drone on and on about this. About how traditional Tibetan sexuality only thinks of sex as the purity of the orifice, without connection to modern concepts of sexuality (as evidenced by Bhutan's sodomy laws and lack of homosexuality laws), the strange duality of the agendered nature of the perfect monastic, while simultaneously portraying women as inferior beings in relation to men, on how polyandrous Tibetan women can be just as good Buddhists as Korean Kings with eight wives and a dozen concubines, but it all really just comes down to how your culture defines appropriate sexual norms, and that as a Buddhist living in the world, you should be free to operate within those norms, but not feed into the egoism and attachment that the Eightfol Path is trying to lead you away from in the first place.