Immediately run cold water over the hot tar or hot plastic to cool the tar or plastic and stop the burning.
Do not attempt to peel the tar or plastic off after it has cooled. This may remove skin that is stuck to the tar or plastic. To remove tar or plastic, loosen it with mineral oil or ointments such as Vaseline or Polysporin. Tar will likely peel off after a few days as the skin cells below the tar flake off normally.
After the tar or plastic is removed, wash and treat the burned skin. If you have any trouble removing tar or plastic from the skin, you need an evaluation by a doctor.