I made some serious efforts to curb my own vocabulary after our daughter was born. I never dreamed I'd hear myself saying things like "oh my stars and garters!" and "Jesus Christ on roller skates!" ("Mickey Mouse on roller skates" works too, if you're religious). But even so, eventually, she overheard some choice language -- mainly while my husband was driving her to preschool in morning traffic...and to be fair, I do recall stomping around the house almost daily looking for that "goddamn pacifier!", and I'm certain she heard that too.
I don't believe that are such things as "bad" words. But certainly there are MANY things that are innapropriate for a child to say. In fact, I just banned my eleven year old from saying "WHATEVER!" (which we all know means F-you, mom).
Okay, but here's what we did when she was a tot: while driving to school, she would point out situations when Dad would use a bad word. I asked her, well, what's something else we could say instead? She came up with this (I think it's from a children's poem): "Why you, double-barreled, disconnected, super-sonic ding-dong bat! You're dumber than the dumbest dumb flea!"
This is MUCH more fun to say, and she would giggle like a maniac. Also, it elicited the reaction of amusing adults, which is at least half the reason why children repeat "swear" words in the first place.
I never did make a big deal about the language, and she never did pick it up. When she referred to the "S" word, she meant "stupid". And later on, she made my husband put money in a jar every time he swore...
Yes, tell him that certain words are unacceptable for children. No question. But I guess my point is that making a huge deal about it might be less effective than turning it back to the child...that's one's a grown-up word, or that one's a potty-baby word...what else could we say?
It's a rich language. I'd just encourage him to explore it and get creative. Open a thesaurus, and read him all the synonymns for "stupid", etc. Google archaic insults. There are so many fun expressions -- and, generally, we are all being quite lazy when we resort to generic "swear" words.