Well, to be honest, it all starts with the parent. It is the parent's responsibility to set the standard of behavior (or conduct of any kind) expected of little children.
Children of any age simply 'mimic' the tone and choice of words they hear from their parents and perhaps others adults. If you do your part to bridle (or in this case filter) the choice of words which you use in a conversation and NOT use profanity, you begin to set the example of what I consider "appropriate behavior". Furthermore, it is a matter of discipline. If your child comes home using a foul word, determine the source and instruct your child not to use it again. Perhaps give them a 'time-out' (or some other form of discipline, like not visit their friend's house) for the behavior and that such a consequence will set the correct conduct expected of your child. Remember, your responsibility is only of your child; no one else.
In my walk, I find that I don't use any kind of profanity. As others here have said, a two-year old shouldn't run around using the "F" word. Foul language is NOT cute nor should it come from a child's mouth or for that matter NOT even an adult's mouth! Quite frankly, I avoid people who use profanity! Go to church sometime and you will know very quickly that foul language is definitely inappropriate.