At some point, sooner rather than later, it will be necessary to invade an enemy base. Some players will quit when they know they can't win or when they lose their army, while other players will only quit when their base is severely damaged or has been reduced to rubble. In team games it is even more important to attack early and often, both to gain the upper hand and to prevent the enemy from attacking. You will need to clear up to four bases (on 4 vs. 4 matches), or up to seven (free for all games). This figure does not take expansions into account; happy razing.
While you storm an enemy base, your troops will be under fire from enemy forces and stationary defenses. More importantly, your opponent will be doing everything in his power to stop you by any means necessary. The following list contains some of the most common issues you'll be facing when you cross the threshold and bring war to the enemy's home turf.
More often than not, players attack an enemy base thinking they have superior numbers, but they don't take into account stationary defenses such as photon cannons, spine crawlers, and bunkers. Overconfidence and cockiness can be more damaging to your forces than a herd of raging ultralisks.
Repairs Under Fire
When you try to destroy important structures (like planetary fortresses), terran players will use their SCVs to repair it while their army uses your forces as target practice. It's better to eliminate hostile enemy units first, then the workers, and finally the target structure. However, if your plan is to try to deal a crippling blow—and you can afford to lose your army in the battle—be sure to kill the SCVs before attempting to destroy the structure. Zerg players can use the queen's "transfusion" ability to heal structures and units. Conversely, if you are on the receiving end of an attack, repair!
Rebound and Counterattack
Many games are lost because players stroll into the enemy base thinking they are going to win, but their entire army is wiped out in the attack. With no standing forces to defend their base from a counterattack, defeat is almost assured (unless their opponent reacts slowly or does not press the initiative at that point). While you cannot always avoid this scenario, you can reduce the amount of failed incursions through practice and experience.
Fresh Units Join the Fray
The defender can, and most certainly will, train new units to reinforce his troops throughout the assault. The attacker, on the other hand, has to bring them from their base which is further away. You can minimize this by setting up a forward production camp near the enemy base (terran / protoss), or by using roads of creep or nydus worms (zerg) to expediently bring more units into battle.
Fully Armed and Operational Battle Station
If the enemy sees you coming, he can commence preparations before you show up. Telegraphing your movements can give your opponent enough time to have sufficient defenses in place to rip your army to shreds. That being said, the enemy may also try to build additional defensive structures during battle. Remain vigilant, for not destroying them may shift the course of battle in the defender's favor.
Don't Advance Uphill Against the Enemy
Enemy forces stationed at the top of a ramp have the advantage, they cannot be attacked unless you have a spotter, and you will probably not be able to break through without suffering heavy losses. Avoid these engagements at all costs, fight on your terms, not your enemy's.
If you are not sure your forces will prevail against the enemy, it is a good idea to pull back to a more favorable position like higher ground, a choke point, or even your base. Just make sure you have defenses in place, otherwise this can cost you the game. When engaging, try not to fight in range of your opponent's defensive structures, use open areas to your advantage, lay ambushes, be crafty. When retreating, be careful not to lose your entire army or significant portions thereof, sometimes it is better to stand and fight. Dealing damage to your enemy's forces is better than simply losing everything while trying to run away.
Expansions are Prime Targets
These satellite encampments, especially those built far away from the main base, generally have light or no defense and can be dispatched quickly. Read more about base expansions.
Learn when to Pull Back
Last stands can be epic, but they're not very conducive to victory in StarCraft II. As battle conditions shift, the best course of action can be to simply back off and retreat. You should always be prepared to change your plans at a moment's notice. Perhaps you need to get out of the combat zone because your opponent is about to get reinforcements, maybe the assault is going to hell in a handbasket. Whichever the case, don't fight to the bitter end. Try to save as many units as you can and come back later with a vengeance (and bigger guns).
Size them Defenses Up, Son
Scout the enemy base to determine their standing forces and defenses. If it looks like a close fight, chances are you'll be routed because your opponent will have home field advantage. Switch tactics, hit targets of opportunity (undefended expansions, for example), attack from different angles, build up your army, create distractions; fight on your terms.
Avoid Enemy Defenses
When attacking enemy bases or expansions try to lure the defenders out. Don't fight while in range of their defensive structures if you can help it. Also, avoid idling around the perimeter of the enemy base for prolonged periods of time. In your indecision, your opponent might start doing hit-and-run attacks at your rear lines, or trying to pull your army into his defensive structures if you're not careful.
Guerrilla warfare is a very effective way to distract your opponent and put a dent in his efforts. If the enemy has a superior force, whittle it down from afar, lay ambushes, divide his forces. Once you've equalized the battlefield, strike the killing blow.
Long Range Attacks
If you have units capable of firing over long distances like colossi, carriers, brood lords, or siege tanks, set up in areas outside their base where you can deal damage to his structures or units (be sure to have a spotter or two handy). In doing this you might be able to break through your opponent's defenses and make way into his main base. Be aware that your opponent may send a unit to poke at your army in order to try and lure your forces into range of his own artillery fire or base defenses. You can use the Hold Position button to prevent this from happening.
Shot to the Heart...
If you take out all the workers in a base, you will deal a severe blow to your opponent's economy. However, if the headquarters remains standing (command center / nexus / hatchery) the enemy will have the opportunity to get the base back up and running. It is also very damaging to lose a headquarters that has been upgraded, particularly for zerg, as they will lose access to higher tech units. If you destroy all of your opponent's headquarters, the location of their structures will be revealed after a certain period of time.
Target Unfinished Structures
Structures under construction take additional damage. Always attack those first when storming an enemy base.
Prioritize the Workers
When you invade the enemy base, kill the workers to damage your opponent's economy. A good tactic is to set up a diversionary attack on one front while you sneak up a team to take out the workers. Even if you don't win the battle, the enemy's production capabilities will be slowed down, and he'll be forced to devote resources to rebuilding his workforce. Just make sure you can replace your losses quickly in case the enemy decides to show up at your door.
They can Run
When players know their base is about to go down in flames, they will try to protect their workers at all costs for these are key to rebuilding at a safe spot. Don't let them. Disengage from your current target and block off their escape. This is especially important in tournament and free for all matches.
Cleaning up an Enemy Base
You've successfully stormed the enemy's main base, and victory is within your grasp; or is it? While your troops are mopping up the remaining structures, send out scouts to every corner of the map in search for expansions. Be sure to destroy all the supply structures to limit your opponent's army size. This will hinder your enemy's efforts to rebuild and take the fight back to you. In team games it's more important to raze a few important structures, like the headquarters, and then move on to attack the next opponent. You can take care of clean up duty later.