The Terran vs Protoss matchup in Starcraft 2 can be very hard against a skilled Protoss player. They have very effective counters to both mech units and infantry and can make your life very difficult. In Terran vs Protoss games, there's going to be a lot of micro and unit management so be prepared.
While you're doing all of that micro, you're also going to have to focus on keeping your macro up too. Expanding when you can, making lots of unit-producing structures, and keeping them active all the time to make a big army is essential.
If you're having trouble winning Terran vs Protoss games, the first thing you should do is watch your replays and try to see where your macro is lacking. Fixing that will give you many more victories. Start with the 3 simple steps that you'll find in my Starcraft 2 Macro Guide. It's free and you can read it right now. After getting your macro skills up to par, use the Terran vs Protoss strategies below to win even more games.
Early Game Terran vs Protoss Strategies
Scouting Protoss players early is essential, they have some of the most powerful "cheese" plays of any race. The 2 that you'll have to worry about the most are Zealot proxy rushes and the Photon Cannon rush. Marines are very fragile so both of these cheese plays can take you down if you aren't prepared. For more information on surviving rushes, check out these guides: Defending Photon Cannon rush and Terran Rush Defense Basics.
In Terran vs Protoss, infantry is a very good way to do some early aggression and keep your Protoss opponent on his toes. If you want to expand fast, get 1 Barracks and add a tech lab, then get another and put a Reactor on it. After you have 2 Barracks up put down a Command Center at your natural expansion.
If you want to work off just 1 base, get 2 Barracks, then a Starport and start making Marines, Marauders and Medivacs as you can. Throwing a few Ghosts in there can be very effective too, but they are very gas heavy so you'll have to go more Marine heavy.
Mid Game TvP Strategy
Throughout the entire game, Ghosts are very useful to help dispatch Protoss armies. If you put down a Ghost Academy early and get just a couple Ghosts it can mean the difference between winning and losing a battle. 1 EMP can knock out a lot of shields and energy on Sentries and High Templar.
If your Protoss opponent notices that you are going to have an infantry heavy army, they will usually either tech to High Templars or Colossi. Both of these choices will require quite a bit of micro from you to be able to stay alive.
If they go for a lot of High Templar, get Ghosts to either Snipe them or EMP them if they are in groups. To fight against Colossi, throw a Reactor on your Starport and get a few Vikings. 4-6 Vikings will greatly help you take out Colossi without losing your whole infantry army.
With 2 bases up you should be able to support 6 or 7 Barracks plus a Starport constantly producing units. If you want to incorporate Tanks into your army replace some of the Barracks with Factories and keep them busy. Siege Tanks can be very useful as long as they are in Siege mode, shelling Colossi and High Templar from far away.
It's important to scout your opponent often and keep track of their army. If you notice that they are going very Stalker heavy, make more Marauders to deal with them effectively. Just be careful that you don't over-commit to any one unit, mix it up to have the most effective army.
Late Game Starcraft 2 Terran vs Protoss Strategy
As the game goes on, both you and your Protoss opponent will have access to your higher tier units and technology. In the Terran vs Protoss matchup though, these units aren't used all that much. Battlecruisers aren't real effective against Protoss, since High Templar and Stalkers can take them out pretty easily. If the Protoss player techs to Carriers, build Vikings to take them down.
Since you will be expanding a lot and making a ton of units, upgrades become very important in the late game. If you're using mostly infantry get 2 Engineering Bays and upgrade weapons and armor. It can also be helpful to get a couple Armories and upgrade vehicle and ship weapons even if you aren't using a lot of them in your army.
Don't forget about Ravens either, they are very good support units for your main army and can harass very effectively. Fly them around and drop Auto-Turrets in Protoss mineral lines to take out Probes. When you get in a confrontation drop down Point Defense Drones to make his Stalkers worthless for a little while.
Long stalemate games tend to have a lot of battles right in the middle of the map. As your opponent expands the most vulnerable spot in his base will become his main that contains a lot of Pylons and unit producing structures. Sneaking a few Medivacs full of Marauders into the back of his base can be a very effective way to cripple his ability to produce more units by taking out Pylons and Gateways.
Since you probably have Ghosts, buy a Nuke and harass his expansions with it. One nuke on a Protoss Nexus will damage it and kill all the Probes who don't evacuate. If you can sneak one of these in you can greatly cripple his economy. Make use of your Medivacs to keep him guessing where you'll attack next. Sometimes the best defense is being very aggressive and keeping him in his base.
Terran vs Protoss Final Thoughts
These matchups tend to be very dynamic and will require a lot of thinking on your toes to win. Skilled Protoss players are very tough to deal with as a Terran player. By far one of the best teachers is experience. The more you play the Terran vs Protoss matchup the more comfortable you will be in it. Don't forget to watch your replays to try to find where you can do better and what you could exploit to win more games.
Again I've got to stress the importance of having good macro as well. Protoss can Chrono Boost Probes out of their Nexus and grow their economy faster than you, so make sure you're always calling down MULE's and keeping your economy high. If you fall behind, they are likely to overwhelm you with sheer numbers. Macro is so important that I created a small guide to help you get better fast. For 3 simple steps to better macro, grab the guide here: Starcraft 2 Macro Guide.