Foul language is now becoming common among little kids too. Before it is too late, correct their vocabulary now.
Check first where your child has learnt swearing words from. The major reason being from friends, peers and the other children they are with.
Another major source of such behavior is the media. Make sure your child watches programs which do make him try negative behaviors. The abuse is very popular in movies (and, nowadays, in TV serials and other programs also) and hence children might think it is ok to do so.
Also if the child observes his elders using foul language, he is bound to follow that and imitate it.
If you find that your child has already learnt foul language from somewhere, talk to your child and make him understand the bad consequence of foul language.
Reward him every time he uses good vocabulary instead of the foul language he used to speak.
Show him how good language and decent expression helps in every situation rather than the bad language.
Overall be a role model to him and behave the way you want him to behave and grow up.