The Bible says we are to anoint a person with oil so they can be healed. How does that work?
In the Bible, anointing a person with oil is a ritual symbolizing the anointing (i.e., sanctifying work) of the Holy Spirit. Anointing by oil is a way of representing an otherwise invisible work of the Spirit to heal or commission an individual for service.
We can see this association reflected in the instructions in the Law. Anointing oil is prescribed in the Law of Moses for preparing the tabernacle furnishings for service and for commissioning the priests for service. Later, the prophets and kings were granted authority by an anointing of oil according to God’s instructions. For example, when Samuel came to designate David as Saul’s successor, we read this:
Notice that Samuel’s anointing of David in oil represented the arrival of the Spirit upon David. The oil itself was not the source of David’s power or spiritual authority; rather, the Spirit was responsible for giving David these things. Nevertheless, the oil was a physical representation of the Spirit’s arrival and work so that those present with Samuel and David could understand that God was acting on David's behalf at that moment. Anointing in oil has always conveyed this symbolic meaning.
Likewise, we are commanded at times to anoint others with oil under specific circumstances to reflect our faith in the work of the Spirit. The church is to anoint leaders in anticipation of their work for God and to anoint the sick in anticipation of the Spirit’s work to heal them. But in all cases, the actual spiritual work is done by the Spirit, not by the oil, which merely represents the Spirit. In fact, the work of Spirit takes place with or without the anointing of oil.
For example, notice John’s statement concerning the anointing of every believer:
John says every believer has the Spirit, which he calls the anointing. So if every believer already possesses the anointing of the Holy Spirit, then we know the anointing of oil is merely a metaphor or picture of the Spirit’s anointing. It doesn’t cause the Spirit to act nor does it replace the Spirit’s work.
This relationship between anointing with oil and the Spirit’s work is similar to the relationship between water baptism and the baptism of the Spirit. The baptism of the Spirit occurs at the moment of our salvation, but water baptism follows later to signify the work of the Spirit. Water baptism can’t take the place of the Spirit baptism though it does picture the Spirit's work.
In the case of anointing the sick, it’s important to remember that our act to anoint a person with oil does not bring about their healing.
Notice James says that the prayer offered in faith restores the sick, not the anointing itself. Only God can heal, and He only does so when it suits His purposes. Prayer offered in faith is a Spirit-inspired appeal to God for His healing work. The application of oil is a sign of our confidence in God’s power to heal and our expectation He will do so at that moment. Our confidence in God's favor to heal in is not a matter of wishful thinking or reliance on the oil; such confidence can only be inspired by the Holy Spirit. When we are so inspired, we pray and anoint expecting to see God act.
So, when we anoint another person with prayers in faith (i.e., with a Spirit-given confidence that God intends to act according to our request), then our anointing becomes a powerful picture of God’s coming work by His Spirit. In this way the function or purpose of anointing with oil is to symbolize the Spirit’s work in the life of a person, whether to commission them for service in a specific role or to heal them in a specific sense.