Actions in Combat
Each turn, you get four types of actions: Free, Swift, Move, and Standard. You can also use a Full-Round action instead of your Move and Standard actions. Swifts are not going to come into play here, nor are the related Immediate actions which take place outside your turn.
You are usually limited to 1 Swift, 1 Move, and 1 Standard action, or else 1 Swift and 1 Full-Round action. Regardless, you may make as many Free actions as you like. The game also has the concept of “non-actions” which don’t even count as Free actions, they’re just things that happen without you doing anything (or as part of doing something else without making that thing take any longer).
Attacking once is a Standard action.
Attacking more than once (taking advantage of extra attacks from a high BAB, two-weapon fighitng, haste, and so on) requires a Full-Round action, that is both your Move and your Standard actions.
Moving your speed is a Move action, so someone with 30-ft. move speed could move thirty feet as one Move action. Because Full-Round Actions are a combination of Move and Standard, you cannot use this in the same round you Full-Attack (usually; some classes, feats, and powers do offer exceptions). Thus you are limited to just a regular, singular Attack as a Standard action.
Also note that while moving as a Move action, you provoke Attacks of Opportunity if you exit any square that an opponent threatens.
Double Move, Run, Withdraw
These are special movement options that require Full-Round actions. Since they are using your Standard action as part of the Full-Round action, they typically prevent you from attacking at all during that round.
Instead of moving as a Move action, you may choose to make a Five-foot Step as a Free action. Since it’s a Free action, it does not interfere with your ability to use a Full-Round action, like a Full-Attack. So you could make the step, and then get all of your attacks, or make all of your attacks, and then step. Note that you may not use a Five-foot Step in the same round as any form of movement, and you can never use a Five-foot Step more than once per round.
Charging is a separate Full-Round action from a Full-Attack. During a charge, you both move, up to twice your regular move speed, and attack, once. Charging gives you a bonus to attack, a penalty to AC, and allows you to move further than you normally would while still getting to attack, but you must be able to move in a straight line to your target.
The special ability Pounce allows you to make a Full-Attack at the end of a charge. Since this allows you to both move and get all of your attacks, it’s very valuable, though fairly difficult to obtain in Pathfinder.
Spells take as much time as they say they do under Casting Time, but for most spells it’s a Standard action. That leaves a spellcaster with a Move action that they’re free to use to move.
A Wizard with 30 ft. movement speed is 40 ft. away from a Fighter, who also has a 30 ft. movement speed. For the sake of example, I’m ignoring what effect, if any, the Wizard’s spells might have on the Fighter. This makes the Wizard a very weak combatant, since his spells aren’t doing anything, but it helps for the example. In a real game, the Wizard may have spells that would very fundamentally change how this combat plays out.
Wizard Turn 1
The Wizard casts a spell on the Fighter as a Standard action, and then as his Move action, moves 30 ft. directly away from the Fighter, putting 70 ft. between them.
Fighter Turn 1
The Fighter, having a 30-ft. movement speed and 70 ft. between her and the Wizard, cannot attack. She decides to Run to the Wizard, a Full-Round action, and can easily close the gap because you move ×3 to ×5 your normal speed while running. The Fighter and Wizard are now 5 ft. apart.
Wizard Turn 2
The Wizard has several options at this point.
He can cast a spell, but that would provoke an Attack of Opportunity for casting a spell while threatened. He could use either a Five-foot Step to move away from the Fighter before casting, or else use the Defensive Casting option to avoid the attack of opportunity, but both options leave him too close to the Fighter. If he steps, the Fighter can just step after him (a Free action), and proceed to Full-Attack him. This usually leads to a dead Wizard. If he casts defensively, he still hasn’t moved and unless he does, the Fighter will still be able to Full-Attack him.
He could, instead, try to move further than 5 ft. away, to avoid the Full-Attack that the Fighter has planned. Withdraw allows him to avoid any Attack of Opportunity, but unless there’s cover handy, the Fighter is going to charge him next turn. A normal Move action provokes an Attack of Opportunity, but puts him out of Full-Attack range while still allowing him to cast a Standard-action spell on the Fighter.
So this is what the Wizard does: he moves 30 ft. away, provoking an Attack of Opportunity from the Fighter, and then casts a spell on the Fighter.
Fighter Turn 2
The Fighter is now 30 ft. away from the Wizard, and therefore will not be able to make a Full-Attack like she’d planned. So instead she charges the Wizard, gaining a bonus to attack and taking a penalty to AC. She could have just used a regular Move action followed by a Standard-action attack, but the attack bonus is better for her than the AC penalty is good for the Wizard, so she goes with that.
At this point, the two are adjacent again, and the Wizard has the same options as he did in Turn 2. He has no way (unless he has a spell for it) to get far enough away from the Fighter to avoid any attacks, but he can avoid a Full-Attack if he manages to keep more than 10 ft. away from the Fighter (out of Five-foot Step range).
In this example, the Wizard is basically accepting two attacks (the Attack of Opportunity and then the Charge) in order to avoid a Full-Attack. At high levels, this makes sense: the Fighter can have three or more attacks in a Full-Attack, so standing there and taking that is very dangerous. But at low levels, where the Fighter may only have one attack anyway, in which case this Wizard’s behavior does not make much sense. But it does depend heavily on their respective stats: a mid-high-level Fighter with exactly three attacks from BAB is taking a −5 penalty on the second attack and then a −10 penalty on the third attack; the Attack of Opportunity, on the other hand, is at full BAB, and the Charge is at +2. Conversely, a low-level Fighter with Two-Weapon Fighting and who has had haste cast on him gets three attacks in a Full-Attack, all at −2 – that might be worth accepting the two attacks to avoid.
Even more importantly, the Wizard probably should, at most levels, have something to prevent the Fighter from attacking him in the first place: a spell to put a wall between them, a spell for faster speed or teleportation, a spell that puts the Fighter to sleep, whatever. In a lot of cases, the best thing for a Wizard to do is to just Five-foot Step to avoid the Attack of Opportunity, and then hit the Fighter with something that prevents the Fighter’s follow-up Full-Attack.