I think what I don't get is how it ends up on the blockchain... and it has to or it isn't mine, right? At some point a miner must be hashing it into a block, otherwise as far as the archive is concerned it hasn't moved.
When you first use Lightning, you open a channel with another party by broadcasting a transaction to the blockchain. You can then move funds back and forth across your channel. When you do, both you and the other party in your channel sign a new transaction stating funds have moved, but you don't broadcast it. You can send money back and forth as many times as you like, each time signing a new transaction stating the new balance. Whenever you want to take the coins back out of Lightning and on to the main blockchain, you simply close your channel by broadcasting the most recent transaction, and whatever the balance on your channel was is how much bitcoin you can withdraw.
Basically you put bitcoin in, move it back and forth, and then take more/less/the same amount of bitcoin out again at a later date. There is a lot more going on behind the scenes in the form of hash timelock contracts to ensure honesty between participants, but that's the basis of it.
So the payment is locked to my wallet by smart contract or whatever it is, but I couldn't spend it over the main chain until it gets hashed in?
That's correct. Bitcoin in a Lightning channel cannot be spent on the main chain until the channel is closed by broadcasting the transaction with the channel's most recent balance.