In today's popular culture, swearing, or using bad language, is extremely common. At first glance, it doesn't appear to be a sin, as it doesn't always hurt someone.
Technically speaking, the use of profanity is not in the Catechism of the Catholic Church, but it does fall under a few different categories.
Using the Lord's name in vain
First of all, whenever someone uses the Lord's name in their swearing, it is a direct violation of the second commandment.
This is probably the most obvious way that swearing can be a sin, as it does not treat God's name with respect.
Calling other people names
The next way that swearing can be a sin is by calling other people vulgar names.
Calling someone a profane name is another clear example of how a person can violate the second commandment.
Foul language in general
After the above examples, there is more gray area, as the Church doesn't specifically list every single curse word in the Catechism.
However, the Bible does repeatedly stress the need to avoid all "foul language."
As with all sin, a person must know that it is a sin and say these words with full consent. Sometimes we may let one slip, and this isn't always easy to stop.
The key is to try and let our language lift other people up, instead of bringing them down.