An injection is the act of administering a liquid into a person's body using a needle. In order to administer the liquid, a vein needs to be found. 
To plead in vain means to plead with no hope in producing a result. Vain is a homophone of vein. A vein is a tube that carries oxygen depleted blood toward the heart. The joke is centered on the word "vain" because it sounds like "vein" and the joke is discussing injections.
' ' I need an injection , ' ' Tom pleaded in vain .