Confirmation, together with Baptism and Eucharist, form the Sacraments of Initiation that are all intimately connected. In the Sacrament of Confirmation, the baptized person is "sealed with the gift of the Holy Spirit" and is strengthened for service to the Body of Christ.
The prophets of the Old Testament foretold that God's Spirit would rest upon the Messiah to sustain his mission. Their prophecy was fulfilled when Jesus the Messiah was conceived by the Spirit and born of the Virgin Mary. The Holy Spirit descended on Jesus on the occasion of his baptism by John.
Jesus' entire mission occurred in communion with the Spirit. Before he died, Jesus promised that the Spirit would be given to the Apostles and to the entire Church. After his death, he was raised by the Father in the power of the Spirit.
Those who believed in the Apostles' preaching were baptized and received the Holy Spirit through the laying on of hands. The Apostles baptized believers in water and the Spirit. Then they imparted the special gift of the Spirit through the laying on of hands. "'The imposition of hands is rightly recognized by the Catholic tradition as the origin of the sacrament of Confirmation, which in a certain way perpetuates the grace of Pentecost in the Church'" (CCC, no. 1288, citing Pope Paul VI, Divinae Consortium Naturae, no. 659).
By the second century, Confirmation was also conferred by anointing with holy oil, which came to be called sacred Chrism. "This anointing highlights the name 'Christian,' which means 'anointed' and derives from that of Christ himself whom God 'anointed with the Holy Spirit'" (CCC, no. 1289, citing Acts 10:38).