Before stage you set the team instructions in the 'briefing'. This ranges from riding for the stage, riding for overall gc, attack the race etc.
When set on automatic in 3D race, the riders will try and follow the preset orders.
I found it handy to set auto when I am more concerned about my main rider in a race. I can focus on controlling him whilst leaving everyone else to do their thing
Also, you can still change orders after the race has already started by hitting the space bar and going to the strategy screen.
In general: If you set "free elements" to attack (or follow attacks) they will try and attack late in a race (usually with little chance of success because the peloton is already going at a high speed). You can appoint two riders as leaders (or one as leader and one as sprinter) and with drag&drop assign team mates to assist them. The team mates will protect the leaders, fetch water bottles and try and form a sprint train for a sprinter. You can even give a "team member" the order to attack and he'll try and make it into the early breakaway to help the leader later on (might be useful in mountain stages).