Young children often bite while playing. While this is not an acceptable behaviour try to analyse why they do it, you might be able to stop it.
Remember we have words, 2 and 3 year olds don't. Their expressions are mostly physical, that is why they kiss, hug, cry and laugh at a moments notice.
There is the aggressive biter and the defensive biter. The kid who initates the biting is either looking for attention or is communicating in a certain way. See what they want. The defensive biter does it to show their irritation with another child. Either way show your disapproval emotionally, do not shout or hit a child that young. Ask the child to kiss the area where he or she has bitten, then praise them exessively. So the child understands biting will bring a frown on your face and kissing will bring praise.
Training a child is so much like training a puppy, it requires endless patience, cotinuous reinforcement and lots of love. The difference is the puppy will grow into a dog and love and obey you forever and the child will become a teenager someday.
Just enjoy their childhood, biting and all.😃