Let's face it, it's pretty embarrassing when your three-year-old starts masturbating in front of company. But let me assure you that if this is your experience, you are not alone.
Masturbation is quite common in children of all ages, from infancy through adolescence, but most common in children three to six years of age. If your child masturbates, don't worry about it. There's nothing wrong with him. He's not oversexed or abnormal in any way.
If this behavior does disturb you, try to distract him. Be sure that you don't scold or punish him. In his mind he's not doing anything terrible, he's just having fun. Remember, the only real harm from masturbating is the guilt feeling you may instill in your child by your negative reaction. Your reaction even at this early age can be potentially have long lasting effects during the maturation of your child.
If you find that he is masturbating excessively, in other words, if it interferes with his other normal activities, discuss it with his doctor. Remember that it's normal and common, it's not harmful and be assured that it will stop by itself.