This is a tricky question, and one I deal with every day. Cussing is in every second sentence with most of the people I work with currently, and for the rest, it's in every sentence. Here are several things I have found that can help.
1. Request (politely) that they cut out some of the cuss words.
I usually go something along the lines of:
Say, for personal reasons, I’m kind of uncomfortable with cussing and swearing. Would you mind just cutting down on the swearing when I’m around, please?
This can work, but bear in mind you have to approach the situation delicately, and if you know the person fairly well, you’ll be better able to tune timing and wording to yield positive results without estranging you from the acquaintance or colleague.
2. Set the example.
Where I work currently, it’s very well known that in the past 3 years I’ve worked there, I’ve never cussed once. I also try to stick out in the way I work: I’m constantly having people say that I’m one of the hardest workers they’ve ever met. My point is not that it’s true (I’m sure they’re just being nice); my point is, the goal should be to not just “fit in.”
While I strongly believe that I should make friends at work and get along well with everyone, if you want to influence people, you’ll have to be different. And what I’ve discovered is that when people see you’re different, you start influencing them.
I’ll never forget one co-worker, to whom I had never spoken about his cussing asking me some questions about various ways I’m different than my colleagues, and at the end of the conversation, he said, “[My name], I really have got to stop my cussing. I see it’s a nuisance to a lot of people, and I think it’s time to stop.”
Those are my two cents (which rounds down in Canada), but I hope they’ll help!