You can take the high road and ignore it, but that's not what you asked. You can call them out on it. Ask them what their problem is and see if they have a legitimate gripe. Tell them you do not appreciate it, but you can be more eloquent if you like. You could tell on them, but that's just lame. If all else fails, just have at it and make them stop, but only as a last resort...try talking it out first.
Do not try the following with a foul-mouthed man: such a man is likely to consider his use of foul language a badge of masculinity. That said, the best way I have found to get a foul-mouthed WOMAN to be quiet (at least when I'm around) is to answer her in such a way that she has to think about what she actually said. For example, if she asks "where's my (bleeping item)" then tell her you dont know about "that kind of item." When she has to think about what she said, she will probably be embarassed and won't use more such language while in your presence.