Sometimes we get a spark when we touch the light switch or even pet the dog, especially in the winter months. What causes this?

Because the air in the winter is dryer it is more conducive to the creation of static electricity.