Its easy to build just an ok team. All you have to do is not do the following things. Don't pick people with no talent for that job, Don't set unclear expectations, Don't ignore them when they excel, Don't play them off against one another. Now avoiding these behaviors and you will be less likely to chase your best people away. But this does not answer how do you build high performance teams?
Lets take a sports analogy: Evey sports team requires many different skills. No one is the best at everything. A winning team requires each one understand their specific roles and roles others play and how they all need to fit together to work as a winning team.
Every great manager finds what is unique about each of his people and makes the most of it.