What if the next pope was crazy and changed everything within the Catholic Church? Is there a way of impeaching a pope who is out of line?
No, a pope cannot be impeached or otherwise removed from office. He may resign if he chooses to do so, but he may not be “forced out”:
The office uniquely committed by the Lord to Peter, the first of the apostles, and to be transmitted to his successors, abides in the bishop of the church of Rome. He is the head of the college of bishops, the vicar of Christ, and the pastor of the universal Church here on earth. Consequently, by virtue of his office, he has supreme, full, immediate and universal ordinary power in the Church, and he can always freely exercise this power (canon 331, Code of Canon Law).
Should it happen that the Roman pontiff resigns from his office, it is required for validity that the resignation be freely made and properly manifested, but it is not necessary that it be accepted by anyone (canon 332 §2).
There is neither appeal nor recourse against a judgement or a decree of the Roman pontiff (canon 333 §3).
Even though popes may indeed become ill, there is no need to worry that a future pope will go “crazy and [change] everything within the Catholic Church.” Modern popes have usually made provisions for resignation should they no longer be capable of governing (e.g., Pius XII, the World War II pope, gave instructions that he be considered to have resigned should he be abducted by the Nazis source]), and, even should no such provisions be made, papal infallibility will protect the Church from a pope erring in matters of doctrine and morals.