How did the reformation lead to the Catholic reform?

Actually, it didn't. The Catholic reform, from what I have read, was already started and Fr. Martin Luther was part of it until he lost his mind. The more obvious part - the Council of Trent, was definitely brought together in part to deal with the protestant revolt.