Ah, the famous Soul Restoration Curse. But first, a little background story.
Many years ago, a vicious vampire named Angelus terrorized Europe. He killed thousands and had no conscience, no mercy. But one day, he fed on a young gypsy girl. The girl wasn't very bright, but she was beautiful and much loved among the Romani clan. When they found out that Angelus had killed the girl, they decided to punish him. The elders conjured up to perfect revenge: they performed a curse that would give him his soul back. It worked. Now, you might be wondering how turning a viscous vampire into a good creature can be considered revenge. The Romanies gave him his soul back so that he could think back on all the horrible things he had done, remember the faces of the people he killed, and feel pain, guilt, and self loathing. (Nice group of people, huh?) They also put a catch in the curse, however. They didn't want Angel's soul to be a good thing, they didn't want him to be happy. So, they said that if he ever gained one moment of true happiness, he would lose his soul. Well, he met Buffy, he got his true moment of happiness, and then he lost his soul again. Not good. Angelus was back terrorizing Sunnydale, and the Scooby gang had to work on finding a way to recurse him. Jenny found out how to do the curse, and Willow performed it. Here's how it is done: