Xcom agents can be controlled somewhat automatically in their actions and reactions to hostiles depending on the settings you choose. To see what each button does, please consult your manual.
Agent Attitude Settings and Tactics
Safe Mode = Blue The agent will seek cover first (even go so far as to break the line of sight to hostile) then engage in combat afterwards if it thinks it will be safe. This is a very similar attitude when panicking. Avoidance is paramount. This mode can sometimes be unhelpful because they can ignore your commands to move, or they stop moving, or they go in an opposite direction. Can be frustrating. Mix of running, walking when seeking cover.
Cautious Mode = Green The agent will position themselves behind an object closeby, if one is available, and start firing if allowed to do so. They will sometimes run from an explosive (which is VERY BAD if a Boomeroid is closeby). Your agents remember where the enemy was when they are shuffling for position to fire, but they won't try to break line of sight. The best aspect of using this mode is that its an equal balance of avoidance and offense. They will strafe to fire if behind a corner, will crawl (or go prone) if there is no cover, also likes to crouch behind cover . The best use of this mode when you don't have hostiles which love to throw Boomeroids. Mix of running, walking when seeking cover if your agent doesn't start firing.
Agressive Mode = Red' Your agents will not seek cover, your agents will not run from grenades, your agents will fire towards hostiles even though there might be neutral security forces in the vincinity, your agents will happily run thruough a swarm of gunfire. Dimension Missiles anyone? This is most common option which is used when fighting against Alien forces. You do not want your soldiers to stop firing when stationary. Offensive is the best defense. If you have a defensive line outside the Alien craft on either side of the door, the last thing you want is for your Agents to get up and shuffle for position. This delay can get them killed. DON'T do the blue chicken dance. Due to this agressive mode, there is no AI movement except turning on the spot. Select the cover for your troops manually instead of relying on the computer to do it for you. It may help to move your troops as a group to the destination, then fine tune their position for available cover once you have reached it.
Agent Speed Settings and Tactics
Note: If set to walk or crawl, an agent that has no weapons will run if they see an enemy, but resume walking/crawling once any visual contact is lost.
Walk The agent will walk to your waypoint, or walk (usually, but will run sometimes) to a postion when seeking cover. An agent can fire a weapon when walking (which could be a good thing), but at reduced accuracy. Stamina does not drain when walking, nor does it recover. The only two reason to use walk fuction is to fire on the move, and to conserve remaining stamina if you need to make a run for it.
Run The agent will run everywhere until tired. Your soldier cannot fire their weapons when moving. Running is very dependant on Stamina. The more your Agent has, the longer they can run.
to be continued...