Following the commandment "Going therefore, teach ye all nations" (cf. Matthew 28:19 Douay-Rheims-Challoner Version), part of the mission of the Church generally is to educate—not only in religion, but in other areas—and in service of this mission many universities around the world are specifically recognized as Catholic universities. Canon law governs the naming of such universities, and puts certain requirements on some of the teachers:
The Church has the right to erect and direct universities, which contribute to a more profound human culture, the fuller development of the human person, and the fulfillment of the teaching function of the Church.
(Code of Canon Law, Canon 807)
The authority competent according to the statutes [that is, the statutes or governing documents of the university] has the duty to make provision so that teachers are appointed in Catholic universities who besides their scientific and pedagogical qualifications are outstanding in integrity of doctrine and probity of life and that they are removed from their function when they lack these requirements; the manner of proceeding defined in the statutes is to be observed.
The conferences of bishops and diocesan bishops concerned have the duty and right of being watchful so that the principles of Catholic doctrine are observed faithfully in these same universities.
(Canon 810; emphasis added)
Those who teach theological disciplines in any institutes of higher studies whatsoever must have a mandate from the competent ecclesiastical authority.
Most importantly, perhaps:
The following are obliged personally to make a profession of faith according to the formula approved by the Apostolic See: ... teachers in any universities whatsoever who teach disciplines pertaining to faith or morals, when they begin their function;
This will certainly affect teachers of theology at Catholic universities.
The "profession of faith" is specifically laid out in a 1998 document published by the Congregation for the Doctrine of the Faith
I, [name], with firm faith believe and profess each and everything that is contained in the Symbol of faith [that is, the Creed], namely:
I believe in one God, the Father almighty, maker of heaven and earth, of all things visible and invisible. I believe in one Lord Jesus Christ, the Only Begotten Son of God,
born of the Father before all ages. God from God, Light from Light, true God from true God, begotten, not made, consubstantial with the Father; through him all things were made. For us men and for our salvation he came down from heaven, and by the Holy Spirit was incarnate of the Virgin Mary, and became man. For our sake he was crucified under Pontius Pilate, he suffered death and was buried, and rose again on the third day in accordance with the Scriptures. He ascended into heaven and is seated at the right hand of the Father. He will come again in glory to judge the living and the dead and his kingdom will have no end. I believe in the Holy Spirit, the Lord, the giver of life, who proceeds from the Father and the Son, who with the Father and the Son is adored and glorified, who has spoken through the prophets. I believe in one, holy, catholic and apostolic Church. I confess one baptism for the forgiveness of sins and I look forward to the resurrection of the dead and the life of the world to come. Amen.
With firm faith, I also believe everything contained in the word of God, whether written or handed down in Tradition, which the Church, either by a solemn judgment or by the ordinary and universal Magisterium, sets forth to be believed as divinely revealed.
I also firmly accept and hold each and everything definitively proposed by the Church regarding teaching on faith and morals.
Moreover, I adhere with religious submission of will and intellect to the teachings which either the Roman Pontiff or the College of Bishops enunciate when they exercise their authentic Magisterium, even if they do not intend to proclaim these teachings by a definitive act.
It is therefore apparent that at least professors of theology who teach things which disagree with the Magisterium of the Church may be—indeed, must be—prohibited from teaching their subject at a Catholic university.
Canon law does not specify any teachers at Catholic universities who must take this profession of faith other than those dealing with "faith and morals", generally applied to theology alone; nor am I familiar with instances in which teachers other than teachers of theology have been removed from their teaching functions for a failure of "integrity of doctrine" or "probity of life".
Note: A comment on this question brings up the subject of the teaching of Hans Küng, who in 1979 was prohibited from teaching theology by a decree of the Congregation of the Doctrine of the Faith, stating:
The Sacred Congregation for the Doctrine of the Faith in the aforesaid document of 1975 refrained at the time from further action regarding the above-mentioned opinions of Professor Küng, presuming that he himself would abandon them. But since this presumption no longer exists, this sacred congregation by reason of its duty is constrained to declare that Professor Hans Küng, in his writings, has departed from the integral truth of Catholic faith, and therefore he can no longer be considered a Catholic theologian nor function as such in a teaching role.
This is one example of the process which can be used.