As has already been stated, the ideal of clerical celibacy goes back to St. Paul. Married men could become priests but the preference was for celibates. Note however, that priests could not and cannot marry **after **ordination.
Various regional synods and councils began to require clerical celibacy very early on. See councils such as Elvira in Spain. It did not become the **universal **norm for the whole of the the Latin Rite until around the 1000s. Your teacher is correct there.
It wasn’t that there was a “change” instituted as much as a recognition that this was the norm throughout the West via various local councils, bishops, etc, and the Pope undertook to make it uniform. The Western bishops believe this to be the best way to live out the call to the priesthood. It is disciplinary, not doctrinal, but it is a part of Western spirituality the way the married priesthood is part of the Eastern.
This article gives a good overview of the historical progression:
newadvent.org/cathen/03481a.htm