Well rounded teams bring a variety of riders to the Tour to support their team leader on varying different types of terrain from stage to stage. These riders rarely have individual ambitions beyond maybe catching a breakaway and going for a stage win; really though, they're there just to support the team's leader.
There's a variety of ways in which they do this... the most obvious to the casual fan is when a teammate drops back to the team car to take on water bottles for the rest of the team. Rather than say Andy Schleck dropping back for his own water and using up energy moving around the pack or potentially getting caught out of a move at the front, a teammate will go back and get water for him and then ride back to the front and bring it to him.
Then there's riders meant only to offer a veteran perspective and 'protect' their team leader within the pack... Keeping with the Leopard Trek example, you may have noticed that Stuart Ogrady was constantly riding just ahead of Andy while Fabian was riding just ahead of Frank... they were doing this to both shield them from the winds as well as to keep them in good position and out of trouble. Both of those guys being so savvy contributed to why the Schleck brothers were among the few GC guys not to hit the deck this year.
Last, but possibly most important, you have teammates who are meant to 'drive' the train for their leaders... Guys like Jens Voigt, Jakob Fuglsang, Maxime Monfort... they were on the squad to set the tempo at the front and blow themselves up working hard at the front with no regard for their own finishing place. Rather they're just trying to set a hard tempo and drop anyone not feeling particularly strong before the team leaders start throwing blows.
So, in a stage like stage 18 when Andy attacked, the team had already put two men in earlier breakaways and had blown up everyone else they had setting a crushing pace... Monfort & Posthuma were up the road waiting. So, when Andy attacked, he first rode up to Posthuma where he got a brief reprieve and had Posthuma doing all the work at the front while he rode his wheel. Once Joost had blown his legs up and couldn't ride hard any longer... Andy pressed on and caught up with Monfort... who then rode hard through the crosswinds in the valley leading up to the Galbier where he then began to fade and Andy once set off on his own again. So, while he casual fan just saw Andy launch a legendary attack from way out and then ride it in for the victory... it was really the team tactics that first thinned the pack and put the other GC guys under neough pressure to not follow Andy.. and then tactics that had men up the road waiting to help Andy ride it all the way home for the win!
Compare that to the following day when Alberto went but had no teammates to help him up ahead... With no one willing to help Andy and Alberto ride to victory, the GC pack eventually caught them.