In Chapter 42 Magwitch tells his story to Pip and Herbert. Interestingly, this is another example of essential plot information being disclosed to the reader through the narration of events that have happened in the past and that Pip could not have told the reader himself, such as Herbert's story of Miss Havisham in Chapter 22.
Magwitch tells of his deprived and harsh childhood that led, seemingly inevitably, to his involvement in crime and with the legal system that seems indifferent to his plight. Compeyson is also introduced, the convict that Pip saw Magwitch fighting with in Chapter 5. Magwitch began to work with Compeyson, a cruel, high-class criminal with connections. An earlier colleague of Compeyson's, Arthur, had died of drink and despair through his involvement with one of Compeyson's plots concerning money and a rich lady. Magwitch bit by bit became more and more entangled in Compeyson's schemes, and when they were caught and tried, it was Magwitch who received the harsher sentence because of his appearance and prior criminal record, while Compeyson had the appearance and bearing of a gentleman. Because of his rage against Compeyson, Magwitch attacked him in the marshes to ensure that he did not escape, even though it meant sacrificing his own chances of flight. He doesn't know where Compeyson is now.
You will want to relate this narrative to the key themes of the novel - Magwitch's harsh treatment at the hands of society leading to his desire to "own" and create a perfect gentleman, and the theme of how do we define what a gentleman is. Compeyson, although having all the appearance of being a gentleman, clearly shows himself to be anything but in character, and through the novel, Pip comes to realise that although Jo does not have the manners of a gentleman, morally, he is far more of a gentleman than Pip has ever been, in spite of his way of talking and ludicrous attempts to fit in socially into a sphere not of his own.