It depends on the situation. For example, banging your thumb with a hammer followed spontaneously by a four letter word is not a sin. Willfully calling your father a four letter word because he disagrees with your life choice is.
Through frequent examination of conscience and confession you will start to meld your mind to the mind of Christ and find that the willful use of foul language will decrease as Christ increases in you.
Jesus came to fulfill the law, not to free us from the law. The Church has rules, but any 2000 year old organization of 1 billion people is going to have a rule or two. More important than rules are the teachings the Church gives us to help us to walk with Christ.
If there is a particular rule or teaching you are having trouble with, perhaps, like me, it is because you don’t understand what the Church teaches and why and need to learn more. Searching through the forums is a great place to delve deeper into these questions.