The anointing of the sick is a sacramental celebration meant to strengthen the soul, mind, and body of those suffering from illness. It is not only for those who are at the point of death, but for all those facing serious illness in their lives.
“Is anyone among you sick? They should call for the priests of the church, and he will pray over them and anoint the sick with oil in the name of the Lord, and the prayer of faith will save the sick person, and the Lord will raise them up. If they have committed any sins, they will be forgiven." — Letter of St. James 5:14-15
According to the Catechism of the Catholic Church:
The anointing of the sick can be administered to a member of the faithful who, having reached the use of reason, begins to be in danger due to sickness or old age.