Exactly what it says on the tin. To masturbate whilst in prison.
Most criminals enjoy a good prison wank.