I've done this since at least middle school. I've bitten my lip, inside and out, and briefly my tongue. There were a few times I swear I almost bit straight through my lip. I have scars on the inside of my mouth in two areas and one on my lip from this. I find the more stressed I am, the more likely I am to nibble. Sometimes it's just a quick nip while I'm writing a paper or playing a game, or it could be a full out taking chunks out of my inner lip. It used to be worse during tests. The pain was actually quite nice, almost pleasurable, and I would (and still do) use the pain as a focus.
I do chew gum and it certainly keeps my mouth busy and helps me not want to chew, but I do have moments still, and I'm 28. I'll sometimes take a taste bud or two while thinking, or pick around my scars. All you can really do is realize you're doing it and switch to something else, either gum, paper, pencil, whatever you have. I used to take the paper clips holding my papers together and hold them in my mouth but I can't do that very well now thanks to my countless amalgam fillings. ~ZOT!~