Simple version. The wallet.dat just contains your private key*. You sign over ownership of coins** sent to your addresses to the new owner. The transaction records the transfer of ownership. To prevent someone else (say me) from transferring your coins for you (to my wallet) the network verifies that the transaction is signed by the private key of your address(es).
Every one of your addresses has a corresponding private key. The magic of ECDSA (and all public/private key encryption) is you can share the public key and keep the private key a secret. This ensure only you can sign messages with the private key but anyone can verify those messages with the public key. You don't actually ever send or receive coins, you ANNOUNCE to the world the ownership change.
Kinda like the digital equivalent of:
"Attention everyone in the world, this 1 BTC coin (see as irrevocable and absolute proof of ownership this prior announcement by [previous owner]), let it be known forever that I have transferred ownership of it to D&T, oh and btw here is a digital signature that proves me and only me, Rupy could possibly have made this announcement. Thank you that is all, please everyone in the world retain a copy of this announcement forever."
later when I spend it:
"Attention everyone in the world, this 1 BTC coin (see as irrevocable and absolute proof of ownership this prior announcement by Ruby), let it be known forever that I have transferred ownership of it to DannyHamilton (why not), oh and btw here is a digital signature that proves me and only me D&T could possibly have made this announcement. Thank you that is all, please everyone in the world retain a copy of this forever."
* Technically it contains more but that is merely to prevent a need to recreate the wallet on each startup. The private keys are what can't be replaced. They are the secret part. If you delete your wallet.dat and don't have a backup it is the lost private keys that you will be crying about. There are no coins in your wallet, your coins are "safe" the only problem is without access to the private keys you will never be able to transfer/spend them. You can forever view them on the blockchain if you like.
** Coins are actually an abstraction. The network works on the concept of inputs and outputs. All transactions (except newly minted coins) have as their input the output of a prior transaction. When your wallet says "you have 20 BTC" what it really means is "I have done an exhaustive search of the blockchain and the the combined sum of the value of all the unpsent outputs assigned to addresses for which I have access to the private key total 20 BTC".