Both of these parties wanted to be in control. They thought they should be the head and didn't like each other.
Lay Investiture is too broad a topic to cover in a quick answer site like WikiAnswers, below are links to articles about it in WikiPedia and the Catholic Encyclopedia.
The appointment of church officials by kings and nobles rather than by the pope
The appointment of church officials by kings and nobles rather than by church officials apex
Emperors and kings disagreed with the Popes over who should appoint bishops. The disagreement lead to the Investiture controversy.
THey gained more power and got to have some control of the church. I am working on the same one
Rivalry between french and english kings.
Rivalry between french and english kings.
Henry wanted the right to name new bishops in his kingdom. Gregory stated that only the pope could elevate bishops. It became known as the Lay Investiture Controversy.
cause they are kings?
The Concordat of Worms was an agreement between the Church and the Holy Roman Empire, signed in the City of Worms, in Germany, in 1122. It brought an end to the Investiture Controversy and recognized the right of the Church to appoint its own bishops. It was an important step toward the idea of separation of Church and State, and was an blow to the belief in the divine right of kings.
Many village priests married and had families.Such marriages were against Church rulings. Bishops sold postions in the Church a practice called simony. Using the practice of lay investiture kings appointed church bishops.Church reformers believed the Church alone should appoint bishops
It brought an end to the Investiture Controversy and recognized the right of the Church to appoint its own bishops. It was an important step toward the idea of separation of Church and State, and was an blow to the belief in the divine right of kings.