The place in the Bible that says to bite your tongue is Proverbs 17:28 which states that when even a fool bites his tongue he's considered wise.
So shut your mouth when you are provoked it will make you look smart.
The phrase "bite your tongue" means to stop yourself from saying something that you would really like to say but shouldn't.
For example I wanted to tell her what exactly I thought of her but I had to bite my tongue instead.
You should bite your tongue when you should not say a particular thing, even though you want to, because it would be the wrong thing to say at the time, or because you are waiting for a better time to speak.
I wanted to tell him how much I would miss him, but I bit my tongue.
Not to literally bite your tongue as that would hurt but you should not say something that you really want too as it may make things worse.