How does a subquery work in sql server 2012?
The answer is that they run in parallel (although the sub-query starts first, according to the execution plan) and then are merged to give you the result you want.  

You can see this for yourself if you select the button to display either the estimated execution plan or the actual execution plan.  The last item is your query.  The execution plan is read from bottom right to upper left.  

But as a bonus, there is a better way to get that answer, and will allow you to get the answer for any Nth highest salary.  The query below uses the temp table you have defined above.  It uses ROW_NUMBER() with the PARTITION and ORDER BY clauses to rank the salary per ID.  

;WITH CTE_Temp AS
    (
    SELECT id
        , sal
        , SalRank = ROW_NUMBER() OVER (PARTITION BY ID ORDER BY sal DESC)
    FROM #tmpTbl
    )
SELECT * FROM CTE_Temp WHERE SalRank = 3
;