1. By not getting into fights in the first place.
2. By training in martial arts for some years.
You can't learn how to fight over the Internet. And, like KW said, if it happens one day the tips you got over Yahoo Answers are not going to work. So be smart and avoid trouble.
If you are talking about big swings meaning that a punch coming is really wide,the best counter is turning side kick or jumping turning side kick,simple and direct and it can finish a fight instantly if you are well trained!
You can receive or avoid a strike in several ways......One way is to get out of the way...That may means just a small head movement...or even a whole body movement. Another way is to attack before the strike comes at you....That may means to start your movement when your opponent is still on the start of his movement, or even when he is trying to get a target. Another way is to block. You can see several blocks, for several strikes in books and videos if you are interested.
You can also register in a good local martial arts school of your area, to train there if you are interested about those stuff.
Your question touches on why people can't basically teach themselves to fight or defend themselves from watching videos and reading books as much as you might think. You basically have a couple of options here and the first option has some limiting factors to it in some ways. Most people back up out of the way and that will only work so long and so much until you run out of room, your adversary lands a hard shot and maybe wobbles you or knocks you down, or you are eventually just too off balance that you can't protect and defend yourself so well anymore. If you rely on this first line of defense you also will want to back up while changing the angles and of course as you move in the same direction those shots are coming around that gives you more time to react and move but you also want to be careful to not move in the same direction all the time, making yourself too predictable about where you will be next.
The above option can temporarily save you and might even help you to defend yourself but you also have to remember that you have little or no power unless you set down on your punches which means temporarily stopping from backing up. Backing up though is what is natural behavior to those that have little or no training and what comes naturally but you will always be on the outside at the end of their power and where they can land those roundhouse punches the hardest usually.
Trained people and trained fighters will instead react by stepping while delivering straight shots like jabs, straight right hands, or front and side kicks with the lead leg when they see an opening. When I spar against untrained people I will sometimes spar them just using kicks and doing this keeps them at that distance where they can't easily reach me. Stepping in, getting closer is unnatural and usually has to be learned along with those techniques and combinations that should be used. Footwork and staying at the proper distance or starting to step in from the proper distance is critical also. Most untrained people when first learning this try to step in from too far away and then that takes more time while giving their opponent more time to see, react and land one of those strong, roundhouse type punches.
I have used a combination of both of these before in a street situation with backing up at an angle a half a step once or twice but then adjusting the distance in relation to my adversary so that I can then step in and instead take the attack to them on that third or fourth swing of theirs. Stepping in can also include things like elbows and knees or take-downs and throws all of which I have used before in those situations along with kicks, jabs, and straight punches. Then you have more power and usually the weight of your body behind those shots while nullifying theirs or them not making direct contact.
This takes training for most and them learning to overcome that natural reflex to step back as well as well as learning other things usually and is why many of us trained discourage people from learning things from books and videos and nothing else.
I got to give it to KW. He said it pretty good. If you want to learn to fight then get training. And he's right. Without any training and experience the only thing you'll be thinking in the head of the moment is "Oh sh*it, oh sh*t, oh sh*t".
I've noticed that every physical fight there is at my school, either one or both of the kids fight by just windmilling it. I was wondering if there is a way to counter that those type of swings because it doesn't take skill to swing like that and the people doing it obviously don't know what they are really doing but they do have power if they land. Any ideas?