What does Magwitch teach Pip?
Magwitch teaches Pip that kindness sometimes comes from unexpected sources. When Pip first encounters Magwitch at the graveyard, there's nothing even remotely kind about the escaped convict's behavior. He threatens and intimidates the young lad, telling him in no uncertain terms what will happen if he should breathe a word to anyone about what he's seen.
Yet in due course, and much to Pip's astonishment, it turns out that Magwitch was his generous benefactor all along, the man who out of the goodness of his heart, gave Pip the necessary funds to help him lead the life of a gentleman. In this class-conscious society, Pip would never have thought in a million years that someone like Magwitch would be capable of such a selfless act. But in the course of the novel, Pip learns, and not just from Magwitch, either, that you can't always judge a book by its cover.
Magwitch teaches Pip to look beyond people's exteriors to what lies within. He appears as a terrfying figure to the young Pip at first, as a grimy, rough convict, and later Pip comes to despise him for his low-class, squalid, criminal background, but he remains true to Pip, never forgets how Pip helped him and in turn generously bestows money on him. Pip comes to realise that he has a good heart and ends up feeling ashamed for looking down on people because of their social backgrounds. Most of all, perhaps, Magwitch teaches Pip the value of gratitude.