Now, for the longest time I didn't think that kind of development was possible in table top RPGs. There is just too much time to think and strategize, even when the GM is moving combat along quickly. There is no punishment when Bob kills the guy you were going to go after, you just kill someone else. The turn based structure a table top RPG needs to function, just gets in the way of that kind of thing. However, a game I was in a couple years ago showed me that I was wrong. That team building can work in a table top game, it just takes a bit of work and the right kind of experiences.
As a Player, this is easy, you just need to want to work as a team. Think more team centered than me centered. What will give the benefit to the group? Is it better for me to kill this guy, or would I be better served injuring two people so that they can be finished off by the other, less hard hitting people? Is this a situation where I am better off moving back to defend the squishy, or should I stay up here? These are strategic things that a lot of groups used to Dungeon crawls do anyhow. So what is the trick? Do this with out OOC chatter. Don't tell people what you are going to do unless you can say it in character, keep yourself in character, encourage the other players to do the same, and while at first it may be frustrating, as the group starts to click you'll get even more out of it. Whats more, things will go a lot faster, and in a sense it can even be kinda creepy when you realize the action taken just before yours is actually the perfect set up to what you had been thinking of doing all along. It is a very cool and interesting feeling getting that level of team work in a table top group. Granted, the work needed for it isn't for everyone, and everyone will get different mileage out of it, but when it works. Oh man, you'll wonder how you enjoyed combat with out it.
As a GM it takes more work. You need to set your combats up differently. Throw some rules out, make some interesting things happen. Set up encounters to encourage working together. Groups of enemies that if the PCs don't work together will mop the floor with them, but if the group does work together will get their asses kicked. Most importantly is you need to be very careful in combat and setting things up, especially while teaching the group to work together. Mistakes will happen, but they need to be mistakes that can be learned from, and they are not going to learn from having the party wiped because the fighter attacked the dragon instead of falling back to shield the mage this round.
Aside from combat set up, encourage people to role play in combat. This is also a weird thing to see happen in table top, but groups who do it I've noticed tend to have more fun. When people are role playing during their combat rounds they are engaged with the game. When people are not? Well, I'm sure everyone has seen a few people strike up a side conversation when it wasn't their turn (or near it) in the combat order. Interestingly enough, encouraging people to do more during the combat round (RPing instead of just doing mechanics) things will go faster. It is also where you will start to see more interesting combat choices. Suddenly, instead of doing the strategically sound thing the mage is over extending in an attempt to get the guy who humiliated him before. The player has not broken from character mindset to combat mindset, combat mindset is now an in character thing, meaning in character influences effect it.
I can't really give more specifics than that, because aside from some basics (like what I laid out) groups will bond differently, and the GM (and players) need to pay attention to that and work with it to make the group form into a proper team. Just remember, people bond over shared hardships and suffering. So nailing the group with some tough fights that they survive, especially if you have them fighting while RPing, will help the group to bond a lot faster. Keep a close eye on threat level, don't be afraid to fudge a few dice to make mistakes educational and not disastrous. Give it time, and keep working at it, and you'll have a Team of adventurers before you know it. Just be warned, Teams tend to wreck a lot more havoc when they decide something just needs to go. The whole, after all, is greater than the sum of its parts.