Stop him before he bites. In other words, prevent it. When he turns his face to you, or puts his head by something he would normally bite, or nip at, put your hand at the side of his nose, and gentally push away, if he keeps on putting it back, push it away until he keeps it away and respects the fact that he has to listen to you.
Sometimes the horse will put their head back many many times, kind of testing you and their boundries. Be patient with this, don't surrender to the horse, make the horse surrender to you.