I have a little boy who is 20 months old and has been doing the same thing. I keep saying he is teething, but there really isn't anything in sight. So I have done a couple of things that has made it a little bit better.
First I have given him a couple of toys that he can bite. His stuffed dog, a chewy teething toy and a couple of other little toys that are big but he can get them into the back of his mouth if he needs to. So if he starts to bite, I grab one of these toys and tell him to bite that instead.
After many tries at timeouts, I've headed in the other direction and deal with it in one of three ways:
1. Put him in my lap to calm down, where he will often start to suck his thumb and eventually want to get down and play again.
2. Told him that I don't want bites, I want kisses - can you give me kisses. This only works if I create a game out of looking for kisses behind his ears, etc.
3. Or I have just pulled my hand out of his mouth and ignored it. I found when I scolded him about it, he would continue doing it, maybe because he was getting attention (I have two other small kids as well so often he is biting them).
Not sure when they are capable of understanding the idea of hurting someone, but hopefully when they can, that will be a new form of explanation that will help them find other ways to vent their frustration.
Hope that helps! Good luck to you (and me!)