Early medieval penitentials were handbooks for confession used by priests. They provided a 'tariff' system for confessors to help them determine how much penance -- usually in the form of fasting -- should be handed out for a particular sin.
Sexual sins are prominent in extant penitentials, and it is surprising how explicit the details are. At times, some of the guidelines to the priest are almost excruciating in their attention to sexual minutiae. For example, in one Old English penitential, there is a penance applied for someone who uses the power of his mind to create an orgasm!
I believe we can learn a great deal about medieval attitudes to sex, and about the range of sexual practices in the early medieval period, if we take the penitentials as serious historical evidence. What we have to realise is that these works don't simply represent an obsessional or even lurid taxonomy of sin, but rather they signify what Allen Frantzen has described as an intersection of text and the actual practice of confession. In other words, they are a distillation of the real-life experiences of countless people confessing, or being urged to confess, intimate details about their lives. The penitentials are, in effect, a recorded performance or narrative of everyday medieval people.
One final point about the penitentials -- and I apologize for my weakness for salacious detail -- but it is rather amazing that one Latin penitential actually refers to nuns using a machina in fornicating -- which seems to suggest the use of dildos! Remarkable!