Lent is a sacred period of forty days set aside for penance, contrition, and good works.
Just as Septuagesima imitates the seventy years of Babylonian exile, Quadragesima ("forty," the Latin name for Lent) imitates the holy periods of purgation recorded in the Old Testament.
The Hebrews spent forty years wandering in the wilderness after their deliverance from the Pharoah and before their entrance into the Promised Land. Moses, representative of the Law, fasted and prepared forty days before ascending Mount Sinai, as did Elias, the greatest of the Hebrew prophets. (So too did the gentile Ninevites in response to Jonah's prophecy.) Moreover, these Old Testament types are ratified by the example of our Lord, who fasted forty days in the desert before beginning His public ministry.
Given the significance of the number forty as a sign of perfection-through-purgation, it is little wonder that Lent became associated early on with two groups of people: public penitents and catechumens. The former were sinners guilty of particularly heinous crimes.
To atone for their sins, they received a stern punishment from their bishop on Ash Wednesday and then spent the next forty days wearing sackloth and ash and not bathing. The visual, tactile, and odiferous unpleasantness of this practice was meant to remind others-- and themselves -- of the repulsiveness of sin. These penitents would remain in this state until they were publicly welcomed back into the Church during a special Mass on Maundy Thursday morning.
Catechumens, on the other hand, underwent a rigorous period of instruction and admonition during Lent. They, too, were not allowed to bathe as part of their contrition for past sins. Near the start of Lent they would be exorcized with the formula that is still used in the traditional Roman rite of baptism: "Depart, thou accursed one!" In the middle of Lent they would learn the Apostle's Creed so that they could recite it on Holy Saturday, and on Palm Sunday they would learn the Lord's Prayer.
Finally, on Holy Thursday they would bathe and on Holy Saturday undergo a dramatic ritual during the Easter Vigil formally initiating them into the Body of Christ. Over time, all Catholics would imitate these two groups as a recognition of personal sinfulness and as a yearly re-avowal of the Christian faith.