Ok so, the mining comes first then? A miner finds a hash, then decides which transactions to include, then broadcasts?
true
Now wait a minute. What about that, then, is inclusive of the previous blocks?
Solo miners or pool operators collate a set of pending transactions and generate a Merkle Tree from them.
http://en.wikipedia.org/wiki/Merkle_treeIt is only the top hash (Merkle root) which goes into the block header. This prevents transactions from being altered (as the top hash would be different).
It is then the block header which is hashed many times by the solo miner or the pool miners. Block header hashes have a target number of leading binary zeros, the number of which increases with difficulty. A dummy value called the nonce is incremented so that each hash of the block header is different until the target is found. Then the block is broadcast, and validated by other solo miners or pool operators. The block header hash is included in the next block header which is hashed, making the whole blockchain unalterable.
Just brilliant of Satoshi to put it all together.