So PvZ is based around a lot of different concepts and its hard to pin down a specific list of strategies you should use. Instead, let's examine the concepts and then we'll look at some of the more popular strategies and how they implement them
The Robotic Facility
The Robo Facility represents many things, but one of the most important of them is the Observer. If you are forgoing a Robotic Facility then you are making a contract: You are sacrificing the power of the Observer as a scout in exchange for something (more Gateways or Air or something else). Because of this contract, you have to make up for that deficit in scouting some how. The reason things like 3 Gate Robo into Colossus are so popular is that it leverages the Robotics Facility for both scouting and unit production
The Gateway
There is no secret that Warpgate is one of the most powerful technologies that Protoss posses. This combined with gas heavy higher tier units means that you don't really have another mineral dump. Additionally, many of Protoss' lower Tier units (like the Stalker) continue to play a vital role into late game. Strategies like 4 Gate really emphasize this aspect. Ultimately, none of the "money" units in a Protoss composition come out of the Gateway. This means that while they will makeup the bulk of your army your real power needs to lie else where. Even for strategies like 4 Gate Blink Stalkers, your power is coming from Blink, not the Stalkers.
Force Field
Against any sort of ground army Force Field is invaluable. This means some portion of your Gas expenditure needs to be on Sentries. It also means that you can't let these Sentries die. The later you get into a game the more energy they accumulate and that means the more you can abuse Force Fields. A number of Protoss strategies peak at their mid game. This is usually because they have critical mass on their money units while still having a significant number of Sentries left over from early game.
Expanding
Just because you're playing against Zerg doesn't mean you shouldn't expand. In fact, more than any other match up it means you have to expand to be able to keep up in production. Since you can't throw away your army like a Zerg player can (because of their faster Hatchery based production), Protoss players have a tendency to stay on 1 Base longer than they should because they have a large enough army to defend it. This leads to poor strategies like 1 Gate into Colossus. Ultimately, if you don't expand you'll never be able to make a significant push to kill of the Zerg player and his production will eventually catch up to your standing army. At that point you've lost. Failing to expand is the slow death. Strategies like 1 Gate Expand or 3 Gate pressure into Expand are designed to take advantage of the Protoss standing army to dominate a Zerg. 1 Gate is designed for more passive Zerg players, while 3 Gate is designed for more aggressive ones. If you see an early expansion from the Zerg (around when you're getting your Cybernetics Core) then you can safely expand. If you see a more aggressive build, progress to 3 Gates and then expand.
Photon Cannons
No Race depends more on their static defense than Protoss. This isn't because Photon Cannons are amazing (quite the opposite), but rather because of the lack of a good mineral dump. As a result you can usually afford a number of Photon Cannons to help defend your expansions from light raids, and delay more heavy assaults. Remember, you don't build Photon Cannons to hold off an opponent, just to buy your army time to get there. Now, many people will be quick to point out that your other mineral dump is the Zealot; while this is true, the Zealot is one of the few units that actually gets worse as the game progresses (as compared to Marines which get better or Roaches which stay about the same). While Charge does help some it doesn't make them effective killers and they don't synergize nicely with Force Field. Instead, think of them as Meat Shields to keep things off your Colossus.
The Money Units
Protoss has two amazing units that are frequently called "Money" units: Colossus and High Templar. Against a Zerg (or even Bio Terran) feel free to use both. Of the two High Templar are really a winner because of their much higher AOE dps. However, High Templar represent an extremely high Tech investment and you will frequently see people transition from Colossus into High Templar in the late game. The reason it is so high is that High Templar need, not only Templar Archive, but also Twilight Council; even then they still need to research Psionic Storm and Kaydaren Amulet to be really effective. Compared to the Colossus which is effective even before its upgrade, its not hard to see why people transition into High Templar. At the same time a good mid-game timing push at 4-5 Colossus can bring down a large number of Zerg players.
The Lack of Air
Protoss air is surprisingly lack luster. While Phoenix are effective against Mutalisks you can't really keep up production with his numbers without over committing and leaving yourself open to a Zergling assault. Like wise, Void Ray are a very situation unit. They excel in a very limited number of cases and do poorly in general army composition.
So let's break down a couple strategies and see how it mixes these concepts together:
3 Gate pressure into Expansion
3 Gate pressure leverages the strength of Warpgate tech to prevent the Zerg from expanding unhindered as well as giving you room to expand yourself. Because you're not going Robo right away, you need to use contact with the enemy as your scouting mechanism. If you haven't had contact for a while its possible you might get overrun with something unexpected. You'll want 2-3 Sentries to fight off early Zergling play, but since you'll be Zealot heavy your main concern is keeping them alive.
Once you're on 2 base you can transition easily into 5 Gate + Robo for a more powerful mid-game. To cut down on any Zergling harassment make sure to leave a Photon Cannon or two at your natural
3 Gate Robo
Because you chose to go Robo first you should have a good view of what your opponent is doing. If you see early pressure this means you can build a bunch of Gateway units quickly. By comparison if you see a more passive Zerg you can use this to tech quickly to your money unit (the Colossus) and expand. You'll want Sentries to cut down on any harassment, but you should largely be concerned with transitioning into 2 Base and building up a decent army. A nice timing attack here is at 4 Colossus + upgrade.
4 Gate Blink Stalkers
This is a very aggressive build and you're going to rely very heavily on pressuring your opponent to keeping him off your base and keeping an eye on what he's doing. Unlike 3 Gate pressure your goal is to actually end the game in the early mid game. Some people might consider this a bit of an "All-in" build because its hard to recover if you aren't successful. Its important to understand that you're making a sacrifice in Expansions and Scouting for greater strength. If you don't have a good feel for this trade off chances are your opponent is going to punish you for it.
Given the attack target priority, a unit will attack units over the barracks. Overlords tie with other hostile units, so they are treated equally. In your Zerg example, there's nothing that would tell the AI to favor other zerg units as opposed to overlords except the player's micro.
In terms of the Terran example, the units should favor the opponent's hostile units over the barracks. What may have been happening is that, given nothing else in range, they continued to attack the barracks. In this case, moving the stalkers so that they are in range of units with higher attack priorities should cause them to favor the opposing army over the barracks in the sky.
Best Answer
Move, then attack-move away, then as soon as they attack, issue a move command followed by another attack move. They won't stop moving until they can fire their shot. Then they will fire instantly and you are free to move them again and repeat.