In Starcraft 2, Terran vs Zerg is one of the most fun and most dynamic matchups. It can also be one of the most frustrating. The Zerg race is so fast and mobile that they can easily exploit the immobility of large Terran mech armies and counterattack when you least expect it.
Zerg also has ways to effectively deal with every threat you can throw against them which means there's no easy way to win this matchup. Like all matchups, after you have a basic understanding of the strategies and units involved, the most important thing to focus on is having good macro. Even if you mess up and build the wrong units, if you out-macro your opponent you'll be able to overwhelm him with sheer numbers. To learn the easiest way to improve your macro, I'll give you free instant access to my Starcraft 2 Macro Guide.
Early Game Starcraft 2 Terran vs Zerg Strategy
It's essential that you scout your Zerg opponent early, you can learn some valuable information depending on what they're building. Most Zerg players will put down an expansion very early, if they don't then odds are they are going for some kind of one base Baneling or Mutalisk play.
If this is the case, then don't expand yet and get some troops out to defend. Banelings rip apart Marines and Hellions, while Tanks and Marauders both do very good against them. If you're sure he's going for a Baneling bust early, then get out some Marauders to soak up the Baneling hits and be the meat shield. If they are going for quick Mutalisks, many times you will be able to end the game with an early Marine & Marauder push.
When your Zerg opponent expands early, most of the time you should just follow suit and do the same. You know that he won't have any real big offensive force out anytime soon, so you can get away with it. For a very fast expansion, put down 1 Barracks then immediately make your Command Center. Use both these buildings to wall off your main ramp to hold off Zerglings, then move out when you have several Marines and make a couple Bunkers to hold off any pressure.
Another very effective Terran vs Zerg strategy that the pros have been using lately is going mass reapers then expanding and transitioning to MMM. Reapers with the speed upgrade (Nitro Packs) are very effective against all low tier Zerg units. Since they outrange Roaches and Queens they can kite them, and Zerglings are no problem at all. Get 5 Barracks with Tech Labs then expand and add on 2 more Barracks with Reactors.
Mid Game TvZ Strategy
As you transition into the mid game in a Terran vs Zerg matchup, there's a few unit compositions that they'll throw at you. Roaches and Hydralisks are a very dangerous combination. The Roaches will get in close and soak up a ton of damage while the Hydralisks hang out behind them and deal most of the damage. If you're using an MMM army, Stim Pack your army and kite the Roaches, Hydralisks are slow so they'll have to retreat or let their Roaches die.
Another dangerous combination is Mutalisks and Banelings with some Zerglings. Zerg players will get Mutalisks, hoping that you get a largely Marine based force, then roll in a bunch of Banelings to take out your Marines. To deal with this put your armored units (Thors/Marauders) out front to absorb the Baneling hits. A great trick is to load up a few Marauders into Medivacs and drop them right on the group of Banelings that are incoming. If you can get the Banelings to blow up on your Marauders you will avoid a lot of casualties. It takes 7 Banelings to kill 1 Marauder whereas it only takes 2 to kill a Marine.
Since Mutalisks are so fast and always pose a threat to your economy, it's a good idea to throw up a few Missile Turrets in every expansion you have to keep them off your SCV's.
When playing against the Zerg, it's important to set up your buildings in a strategic way to channel any attacks through choke points. If you get counter-attacked by speed Zerglings or burrowed Infestors, you want to make it as hard as possible for them to get into your base. Instead of building your Supply Depots out of the way, use them to wall off parts of your base and burrow them when you need to move out.
Most good Zerg players will go for Infestors at some point, which can cripple your army whether you're focusing on mech or infantry. To fight Infestors lay down a Ghost Academy and get some Ghosts to support your army. Use their EMP to knock out the Infestors' energy if they are grouped or you can Snipe them if they're separated. 2 Snipes kills an Infestor and only costs 50 energy.
Your army should be composed of a mix of units dependent on which buildings you've made so far. If you're really Barracks heavy, then you should definitely get a few Starports for Medivacs and concentrate on a big Marine, Marauders & Medivac force.
If you're going mech, then you'll be making your way across the map with Siege Tanks, Hellions, and Thors with some Marines sprinkled in there. It can be very handy to bring a few SCV's along with your attack army to keep your units repaired (since they're all mechanical).
Don't forget upgrades!
Late Game Terran vs Zerg Strategies
If your Terran vs Zerg game progresses into the late game, you're going to start seeing Ultralisks or Brood Lords. Very rarely will any player be able to get both with any effectiveness.
To fight off Brood Lords, you're going to need Vikings. No other unit that Terran has is good at taking them out. Most Brood Lords will also have an escort of Corruptors which are pretty efficient at taking out Vikings. Keep them at max range as best you can to get the most out of your Vikings. Since you will need quite a few, it can be a good idea to build a couple Starports and add Reactors to them if you have time. Alternatively you can lift your Starports onto existing Reactors that were on your Barracks or Factories.
If your Zerg opponent goes for Ultralisks, they'll likely be accompanied by a ton of Zerglings, which do a ton of damage once they're upgraded. Use Stim Packs with your Marauders to kite and take out the Ultralisks. If they get in close to your Marauders they will die very fast. If you're running a mech army, keep your Hellions out in front of your Tanks to roast Zerglings and prevent them from closing range.
No matter which top tier unit that the Zerg opts for, use your Ghosts to snipe them. One Ghost when fully charged can Snipe 8 times, which is 360 damage. Try not to let any of your Ghosts die without using up all their energy on EMP's or Snipes.
Final Thoughts on the Terran vs Zerg matchup
If you're using an infantry heavy army with Medivacs, make use of them to quickly move around to different expansion locations of the Zerg and take them out. Zerg tends to expand like crazy, so if you want to win you will have to actively take new expansions and deny the Zerg of getting theirs.
This all comes back to basically out-macroing your opponent. Expanding early and often & keeping up unit production is the way you will win against Zerg. Use the Terran vs Zerg strategies mentioned in this article to keep him on his toes and don't forget to grab a copy of my Starcraft 2 Macro Guide.