When transactions are in a deadlock situation, SQL Server chooses one as the victim of the deadlock. That means that the victim transaction will be canceled and rollback whereas the other will keep on going as if nothing happened. SQL Server chooses the victim based on the difficulty (CPU cost) of rolling-back the victim's changes. The victim transaction will then error out with the error code 1205, which is quite explicit.
You can set the transactions' deadlock priorities yourself, as explained in the second link.
More details here : http://technet.microsoft.com/en-us/library/ms178104(v=sql.105).aspx
And here : http://technet.microsoft.com/en-us/library/ms186736.aspx
Btw, the fact that you use SQL Server matters a lot ! Some other DBMS would just keep the transactions in a lock forever, and others would just choose to error both transactions out. I never heard of one that would consider the transactions complete and roll them back, though...