Plastic is a bad conductor of electricity, then how does it create a magnetic field around it?
It depends on the exact type of plastic and the shape of the plastic sheath.
If the shape is the same the permittivity and permeability of the material can play some role on how the magnetic field shape, and if the material is conductive (there are conductive plastics) there is a whole another class of possibilities.
Conductive plastics conduct electricity in contrary to normal insulating thermoplastics. They are recyclable and can be extruded or injection molded fast and cost-efficiently into desired shapes and sizes. Conductive plastics are controlling static electricity in countless applications across many industries.
Conductive plastics have many advantages compared to metals:Conductive plastics are typically used in ESD (electrostatic discharge) control, as well as ATEX (explosive atmospheres) and EMI (electromagnetic interference) shielding applications. Other uses of conductive plastics include metal replacement solutions, level detection sensors, heating elements, air cleaning systems, dust suppression and the prevention of electrostatic attraction (ESA).
By ensuring that any plastic material is electrically conductive, we can eliminate the problems caused by electrostatic discharge, making the world a more comfortable and safer place for all of us!