Here are three easy ways to say the same idea for a 7-year-old:
The skunk sprays a stinky smell at the animal that came too close.
The skunk shoots out a smelly spray to scare away the other creature.
When something bothers it, the skunk sprays a strong, smelly scent to get away.