The first thing to remember when you discipline a child is that every child is different, just like every parent. If you use the exact same discipline for ever child then you are not being as affective as you could be.
Do not automatically resort to spanking as the only way to discipline a child. Do not assume that physical punishment is the best way to discipline a child. In many cases it is the worst way to discipline a child. The negatives to spanking in some cases far outweigh the positives. Spanking can make the child afraid of you. Parenting through fear is not what you want.
A lot of people use time outs when they discipline a child. Again, with some kids this is perfect. The idea of sitting quietly by themselves while everyone else is having fun is a strong deterrent for some. For other kids it is a joke.
The overall most effective way to discipline a child is the take away things. This can either be toys they like to play with, a play date with a friend, or anything the child likes. Be sure when you discipline a child in this manner they understand why you are taking away something and when they will get it back, if ever. Make a big deal of what they are going to be missing out on because of their behavior.
No matter how you discipline a child make sure it makes sense. Take a second and think about it before you tell them. Make sure the discipline a child receives fits the behavior. If you take the time to learn how to discipline a child in the best way your job as a parent will be easier.