sum of all inputs values - sum of all outputs values
"Change" is an output that you control to which you will send the remaining amount. Failing to do so will end up sending all remaining value as transaction fee, which then goes to the miners.
If you end up doing that (as I did few months ago) you still have a chance though - through blockchain.info you can get information about who mined the block in which your transaction was included. If you're lucky, it will be one of the big pools. You can then try to contact them and ask to send the amount back to the originating address. In my case BTC Guild was nice enough to do exactly this.
If you need a coin or two to get started, I run a testnet faucet at [redacted].
Or check out https://github.com/freewil/bitcoin-testnet-box.