The Lupercalia was one of the most ancient Roman festivals, which was celebrated every year in honour of Lupercus, the god of fertility. Based on rituals of purification and fertility dating from much further back so that even the Romans of the first century BCE had forgotten its origin and to which Gods it was dedicated and even the meaning of some of its symbolism.
The festival was held on the 15th of February, the rituals began in the cave of the She-Wolf - the lupercal, in the city of Rome. It is in this cave that legend says the founders of the city, Romulus and Remus, had been suckled by the she wolf before they were found by a shepherd. A sacred fig tree grew in front of the cave. The place was turned into a place of worship, and contained an altar and a grove sacred to the god Lupercus. Here the Luperci assembled on the day of the Lupercalia, and sacrificed goats and dogs, noted for their strong sexual instinct, and seen as worthy sacrifices to the god of fertility.
Central to it's rituals are the lustration - a light flogging/whipping with a goat skin whip. This was often usually a part of a lot of other festivities, celebrating, and fooling about. The purpose behind these rituals was the purification of the people from curses, bad luck and infertility. So essentially these where rituals to induce good luck and fertility.
Similar rituals held in other parts of the Empire had to use venues symbolic of the cave on Mount Aventine.
The ritual festivities went primarily as follows:
Two high-born young men stripped naked and sacrificed a dog and a goat. They smeared blood on their foreheads, then wiped it off with wool dipped in milk. The men made a show of laughing and wrapped strips of the goat's hide about themselves. A great feast was then held and then using strips of the goat skin, the young men ran, each leading a group of priests, around the base of the hills of Rome. Each man lead a group of near-naked men around the hills and bounds of Rome. These two colleges of priests were called the Luperci Quinctiales and the Luperci Fabiani. During this run, the women of the city would vie for the opportunity to be scourged by the young men as they ran by. The women would line up to be whipped by the priests with strips of goat skin, often going nude and working hard to entice a good flogging to get the best results of the fertility blessing.