It's the skunk's defense mechanism–its spray. When a skunk feels threatened by a predator–wolf, fox, badger … or even human–it turns around and releases an oily spray from the glands located underneath its tail. According to Wonderopolis, the spray is made up of sulfur compounds called thiols.
Why do skunks smell so bad?
Skunk spray is a thiol, an organic compound with sulfur as a principal component. Sulfur has that classic rotten egg smell, and it's what gives thiol its gag-inducing power. For detection purposes, thiols are added to otherwise smell-free natural gas, so that it will have a noticeable odor.
Why do I smell skunk every night?
If you're smelling a skunk at night, it likely means that there is one closeby who has recently sprayed in defense. ... The stronger the smell, the closer the skunk is.