This is a daunting question, but merits a response. Before talking about how someone could possibly remain celibate their whole life, we should be clear on exactly what is meant by being celibate, and why one would remain celibate. Celibacy is one of three vows taken by religious (I am a consecrated Religious living my vows for almost ten years now) the other two being poverty and obedience. Diocesan priests do not take a vow of poverty, but they do make a promise of obedience, and a vow of chastity. The vows are formulated according to what are called the Evangelical Counsels, and are described in the scriptures by Christ Himself.
Focusing only on Chastity, the code of Canon law says this,
Can. 599 The evangelical
counsel of chastity embra ced for the sake of the Kingdom of heaven, is a sign of the worldto come, and a source of greater fruit fulness in an undivided heart. It involves the obligatio n of perfect continenceob served in celibacy.
And this is not simply a pious idea invented later on by the Church, but comes directly from Christ’s own recommendation:
“Some are incapable of marriage because they were born so; some, because they were made so by others; some, because they have renounced marriage* for the sake of the kingdom of heaven. Whoever can accept this ought to accept it.”(Mt. 19:12)
Even Saint Paul has a recommendation in the same vein:
1 Now for the matters you wrote about: “It is good for a man not to have sexual relations with a woman.” 2 But since sexual immorality is occurring, each man should have sexual relations with his own wife, and each woman with her own husband. 3 The husband should fulfill his marital duty to his wife, and likewise the wife to her husband. 4 The wife does not have authority over her own body but yields it to her husband. In the same way, the husband does not have authority over his own body but yields it to his wife. 5 Do not deprive each other except perhaps by mutual consent and for a time, so that you may devote yourselves to prayer. Then come together again so that Satan will not tempt you because of your lack of self-control. 6 I say this as a concession, not as a command. 7 I wish that all of you were as I am. But each of you has your own gift from God; one has this gift, another has that.
8 Now to the unmarried[a] and the widows I say: It is good for them to stay unmarried, as I do. 9 But if they cannot control themselves, they should marry, for it is better to marry than to burn with passion. (1 Cor. 7)
So consecration to prayer and union with God is aided by abstaining from the sexual act (which itself is only licit with one’s spouse). Since man is not simply made for woman, and woman is not simply made for man - but God has created them both to adore and contemplate Him - human nature can be finalized by the contemplation of God. This requires going beyond the natural finality of human nature, but it is God Himself who - by creating spiritual beings - wills that their persons find ultimate fulfillment in Him.
The only way it is possible to keep a vow of Chastity is to be actively offering the inclinations of our nature to unite one’s person to God in contemplation. When one does not devote much time or fervor to prayer, the vow no longer makes much practical sense, and then we see the phenomenon of repression or suppression of urges that lead one’s nature to an eventual revolt. For those who are sincerely devoted to prayer, and to growth in virtue (which is not simply repression/suppression of urges), they truly become witnesses to the fact that God is the sovereign good - that He can and does completely fulfill human life.