Carefully teach your child correct behaviors. Show and teach them what to do. Be firm about the things that really matter. Be flexible about less important types of misbehavior. Your tone of voice, words and actions show that you mean what you say.
Some children misbehave just to get attention.
Once you teach your child the correct behavior, it may be best to ignore attention getting behaviors like temper tantrums or foul language. The same is true of behaviors like silliness or exaggeration. These behaviors reflect the child's immaturity. Your best discipline tool is your attention. Give children massive amounts of attention.