Most answers goes into the practics of teaching. But more philosophical thinking is also important!, and a book that I found extremely helpful (and fun!) was Imre Lakatos: "Proofs and Refutations: the Logic of Mathematical Discovery".
Go read it! It will also help your teaching.

