How do you stop a yearling filly from trying to bite you? Weanlings and yearlings minds are like sponges that are damp with moisture. They have a little bit of experience of what the world has to offer but still have a lot of room to hold in more and so are eager to learn. They can be very curious while at the same time frighten easily because they don't have the experience. Now think back to when you were 5 years old and you first experimented with your moms makeup (or whatever age you were). You probably made a mess of it all over you and on clothing, furniture, etc. She found out. Your mom then probably did one of two things. Either yelled, screamed, spanked you and sent you to your room or was astonished and told you how disappointed she was in you and sent you to your room to think about what you did. In both cases you got sent to your room to think about what happened. You probably can relate in someway to either option. Which one made the most lasting impression on you on how you act today. I bet it was when your mom was disappointed in you because that effected our emotions more than then the spank did. A spank is short term where the disappointment in love lasts immeasurably longer.
Now lets relate that to a horse. Most of the time a weanling or yearling nibbles on you because they are just being curious and since they don't have hands all they can use to grab something to figure out what it is is by using their mouth. I want the horse to learn that nibbling is not right to do to humans but I don't want them to be frightened so that it becomes harder for them to earn our respect later on. What I do is as soon as the horse nibbles me I go and give her a lot of rubs stronger than normal on her cheek. I keep rubbing even if the horse turns her head away. I rub for about 5 to 7 seconds and then do a light pet somewhere else on her body for about 1 to 2 seconds then I go back to doing whatever it was I was doing before the nibble. If you do this each time she nibbles you then after about 3 times she would've figured out that each time she nibbles she gets a hard rub that isn't that fun so she'll stop doing it and will still respect and appreciate being around you.
If on the other hand if she just bites you for the fun of it then that is another story. Especially if it really hurts. She is playing a game with you and we want her to know that that game is not allowed. You then need to take in account your own safety and so you need to do what it takes to protect yourself. The only catch is you can only use your bare hands and only touch her above the legs and not on the head. Based off of John Lyons methods from the moment she bites you you have 3 seconds to kill her with your bare hands and it can not last shorter than 3 seconds either. Hit, Slap, Scream, Yell for those 3 seconds on her main body and then stop. Do NOT do anything else past those 3 seconds. She most likely will run off and go find a herd mate to hang out with. If she takes off before the end of the 3 seconds at least continue to yell. The drawback with this is it can take her a while to warm back up to you but as soon as she does give her a lot of affectionate pets and rubs. You can even go to her after about minute later after the reprimand. All the hitting and screaming will cause a frightened response in her and so she may not do it again after one or per haps 2 times. But at the same time she will then be a little afraid of you and so you will need to build up trust again.
Each method works if it is done for the right reason as long as you are consistent.