What is the goal of boxing?
The answer: to hit and not get hit.
So, do you think moving head on into an opponent is the best way to achieve the above?
The answer: No.
When you are in the ring, facing an opponent and are static, that is, not moving, you are a target. Same goes for your opponent. Both of you know it, so what do you do?
You protect yourself. You put up your guard and you ensure as little of your body or head is visible. This is how you satisfy the "not get hit" part of the equation above.
Now how do you expect to hit if your opponent is doing the same thing?
For starters you could be like Rocky Marciano and just punch whatever you can. Arms, shoulders, forearms, nail them and nail them hard. Some boxers that boxed Rocky said that every punch hurt and it didn't matter where you got hit. So, if you're a swarmer like Marciano and have the power, then punch and punch hard. Just be ready to receive whatever you are giving.
For most of us, that is not an option and as such we have to learn to create openings. This can be done in two basic ways:
1. Using angles: Sideways movement is unpredictable. Back and forth moving is predictable. When you throw out a jab, any untrained person will generally lean back to try and get out of the way. There is some merit of that in boxing, but in general, it is a predictable response and one that leaves you in no position to counterpunch. A far better option is to step to an angle or slip the punch. It is so much more unpredictable (you can move in a number of angles with a number of rhythms), plus it sets you up to counter attack.
2. Using feints: Do not confuse this with deception, this is more of a trick for lack of a better term. Pretending to punch someone in the head and then switching mid way and hitting to the body will likely create an opening as they bring their arms up to protect their head. Same goes for the body. Fake a shot to the ribs and the arms will drop as your opponent flinches giving you a split second to switch it up and land one to the head. Feints do not just have to be punches. They can be body movements as well such as pretending to go left and then suddenly going right.
Deception, I'll save for another day. It involves a lot more thinking in terms of the strategic effect you want to achieve.
All the time. The less predictable you are in the ring, the less chance you will get tagged and the more chance you have of finding an opening. If you are moving backwards when you fight, you aren't fighting, you're fleeing. (There are exceptions to this, and some great boxers can punch off the back foot or a movement backwards).
When you are attacking from different angles, not only are you creating openings, but you are messing with your opponent's mind. You are can get within their decision making cycle and actually make them do what you want them to.
Ideally, with a partner during sparring. However, you can go through the motions with your heavy bag or double end bag. Punch and then move sideways or at various angles around the bag. Practice the feints by faking a shot to the head and then delivering it low and vice versa. The idea is to make the fake shot look believable. Sometimes, that can be done with something as simple as an exaggerated movement with your shoulder or the faintest hint of movement from your hands. It can also be done just by looking in a certain spot.
Look at your opponent. If he or she is incredibly tense, they will be susceptible to exaggerated flinches and you will have excellent success in employing this boxing tip. Because they are so tight and tense, they are either completely incapable of moving or when they do move, it is with far too much energy and force. Something as simple as deflecting a jab should only take a slight movement of the hand. Someone this tense will move their entire arm leaving you a giant target. You want to learn to utilize the momentum of your opponent to your advantage, but that is for another day's boxing tip.