How does the creation of electricity cause pollution?
Electricity is generated transforming other forms of energy such as chemical energy (burning fuel) or nuclear energy (breaking atoms).
If you consider a typical plant for the production of electrical energy, you'll have
1) a turbine connected to a dynamo to generate electricity through, basically, magnetic induction;
2) Pressurized steam to move the turbine (rotate it);
to produce steam you'll burn fuel such as coal or oil that will produce pollution (fumes);
you'll use a nuclear reactor where you'll heat water (to change it into steam) by breaking heavy atoms (Uranium) that will produce energy to heat up water and produce steam but also radiation and radioactive and very dangerous by-products that you'll need to store in some place for loooong time!