Briefly, Pip's convict was trying to prevent the second convict from escaping from the prison ship because he hated him so much that he wanted to make sure he would serve out his full sentence, even though this could mean that he would be recaptured himself. The two men had been partners in crime, but the second convict had double-crossed Pip's convict and gotten him imprisoned for a crime they had both committed. Magwitch (Pip's convict) explains all this to Pip late in the novel when he returns illegally from exile in Australia. Later, the second convict (whose name I have forgotten) is responsible for Magwitch's recapture when he and Pip are trying to flee the country together. You ought to be able to check this on Magill's Cyclopedia of Literary Characters, which is accessible through eNotes or in good libraries.