When Christ sent His disciples out to preach, "they cast out many devils, and anointed with oil many that were sick, and healed them" (Mark 6:13). James 5:14-15 ties physical healing to the forgiveness of sins:
Is any man sick among you? Let him bring in the priests of the church, and let them pray over him, anointing him with oil in the name of the Lord. And the prayer of faith shall save the sick man: and the Lord shall raise him up: and if he be in sins, they shall be forgiven him.
Following this biblical understanding, the Catechism of the Catholic Church (para. 1514) notes that:
The Anointing of the Sick "is not a sacrament for those only who are at the point of death. Hence, as soon as anyone of the faithful begins to be in danger of death from sickness or old age, the fitting time for him to receive this sacrament has certainly already arrived."
The Anointing of the Sick, sometimes called Extreme Unction or the Last Rites, is available to all who are gravely ill or are about to undergo a serious operation. The Sacrament of the Anointing of the Sick can be repeated as often as is necessary.
In the Rite of the Anointing of the Sick, the priest lays hands on the sick, anoints the person with blessed oil, and prays, "Through this holy anointing may the Lord in his love and mercy help you with the grace of the Holy Spirit. May the Lord who frees you from sin save you and raise you up."