If you took the Lord’s name in vain, or blasphemed, then it’s definitely a sin. If you used some other word, might or might not be a sin depending on degree and circumstance (example, if you accidentally hit your hand with a hammer while pounding in a nail, and immediately yelled out a swear word in pain, then it may not be a sin because you reacted out of pain and being startled).
You are better off asking the priest in confession whether something is a sin, or mortal or venial, than taking a poll on this board because we really aren’t qualified to judge.
If it is a venial sin, you may still go to Communion, as the requirement for communion is that you be in a state of grace and you only lose that if you commit a mortal sin. See CCC 1415-1416. http://www.vatican.va/archive/ccc_css/archive/catechism/p2s2c1a3.htm
However, If you are in doubt as to the degree of the sin, it is best to go to confession before communion, to remove all doubt.
Do you mean literally swearing? Like “I swear to God” or do you say things like “Jesus Christ.” I consider you using the f, n, b, and c word to be mortal sins because how offensive they are. I think it would probably be better to consult a priest regarding such issues.
DISCLAIMER: Catholic Answers has turned over the archive to Catholic-Questions.org and no longer owns, manages, or moderates the forums. For additional apologetics resources please visit www.catholic.com.