My ds went through a pretty bad biting phase when he was 2.
Basically, I had to be a super vigilant helicopter mom, never leaving his side (literally) when we were around other kids. And even then, he managed to sneak in a bite here and there! I think that's the first thing: a child who cannot control himself and can potentially really hurt other kids must be watched constantly. I don't mean just in the same room. I mean sitting right next to him, ready to jump in if need be.
Second, start to recognize the signs that come before the biting. My ds, for example, bit when he felt threatened. If another child took a toy from him, if another child got too close and ds thought the kid would take something, if another kid grabbed him, if a kid took a toy that ds wanted.... I'd watch for those things and intervene if I saw them happening to prevent the situation from escalating for my ds.
Third, we cut way down on the activities we did that involved other kids. He got overstimulated and couldn't handle too much interaction.
Fourth, if he was at all tired, hungry, under the weather, etc. the problem was worse. So we tried to go places in the morning, after he ate, when he was feeling his best.
When he was old enough (and this varies from kid to kid) to understand consequences, I would explain our rule to him every time we went somewhere. "Be gentle." If he wasn't/isn't gentle, we left/leave immediately.
It's hard. There's no easy solution, no one-thing that will work for everyone. We really struggled with it. Ds is now 3.5 and, with the exception of an altercation with another child a few weeks ago, hasn't bitten anyone in a loooong time (again, knock on wood).
Good luck!