The Catholic understanding of penance is tied to a recognition of sin's effects on a soul and our efforts to restore our relationship with God and neighbor.
The Catholic Church teaches that penance is intimately bound-up to the Catholic understanding of sin.
The Catechism of the Catholic Church provides a perfect summary of penance and its connection to sin.
Many sins wrong our neighbor. One must do what is possible in order to repair the harm (e.g., return stolen goods, restore the reputation of someone slandered, pay compensation for injuries). Simple justice requires as much. But sin also injures and weakens the sinner himself, as well as his relationships with God and neighbor. Absolution takes away sin, but it does not remedy all the disorders sin has caused. Raised up from sin, the sinner must still recover his full spiritual health by doing something more to make amends for the sin: he must “make satisfaction for” or “expiate” his sins. This satisfaction is also called “penance.”CCC 1459
In this case, penance is the word that describes our actions to repair the damage left by sin.
Typically this definition of the word is tied to the sacrament of penance, whereby a priest will prescribe a penance to make amends.
The penance the confessor imposes must take into account the penitent’s personal situation and must seek his spiritual good. It must correspond as far as possible with the gravity and nature of the sins committed. It can consist of prayer, an offering, works of mercy, service of neighbor, voluntary self-denial, sacrifices, and above all the patient acceptance of the cross we must bear. Such penances help configure us to Christ, who alone expiated our sins once for all. They allow us to become co-heirs with the risen Christ, “provided we suffer with him.”CCC 1460
This is the most common understanding of penance, though sometimes saints will explain how they would go above and beyond what the priest prescribes and impose a “personal penance.”
For example, a saint may explain how they always slept on the floor as a penance for their sins or weaknesses. Their confessor didn’t suggest that they do that, but the saint may do it anyway, so that they can join in the suffering of Christ on the cross.
Normally they would only engage in such actions under the guidance of a priest, who would make sure their actions weren’t harmful to their body or soul.
The key to the Catholic meaning of penance is that it is an action done in reparation for sin, with the intention of restoring our relationship with God and our neighbor.