(http://www.nba.com/analysis/rules_12.html?nav=ArticleList)Rule 12 Fouls and Penalties
A. Technical Foul
Section V-Conduct
g. If a technical foul is assessed to a team following a personal foul on the same team, the free throw attempt for the technical foul shall be administered first.
h. The ball shall be awarded to the team which had possession at the time the technical foul was assessed, whether the free throw attempt is successful or not. Play shall be resumed by a throw-in nearest the spot where play was interrupted.
j. Free throws awarded for a technical foul must be attempted by a player in the game when the technical foul is assessed.
n. A free throw attempt is awarded when one technical foul is assessed.
o. No free throw attempts are awarded when a double technical foul is assessed. Technical fouls assessed to opposing teams during the same dead ball and prior to the administering of any free throw attempt for the first technical foul, shall be interpreted as a double technical foul.
Everything you need to know.