Since I am new to developing smart contract, I will answer your question in a somewhat abstract manner. Consider the real world example of automobile titles and a private auto sale. The seller agrees to sign the title over to the buyer in exchange for a sum of money exchanged from the buyer to the seller. There are two compensating value exchanges (dollars from buyer to seller and signed title from seller to buyer).
In the blockchain world, you understand the concept of owning ether. In the same way, the automobile title could be represented as a token that the seller has received from an earlier transaction when the auto was purchased. The AutoTitle Token would be equivalent to an unspent transaction in the sellers account, and the seller can prove they own the auto by proving they control the account in which the transaction remains (by proving knowledge of the private key). To facilitate the sale, a smart contract could be written that requires BOTH a signed ether transaction (from the buyer to the seller) and a signed AutoTitle Token transaction (from the seller to the buyer). If BOTH transactions are not completed, the smart contract can stipulate that any input transactions that were approved but not completed (sitting in escrow) would be reversed.
Again, I am too new to smart contracts to show you sample code, but in principle that is how the commercial ethereum contracts operate.