So to solve a block on the main bitcoin network, you have to keep trying values until you get one that results in a value below the difficulty target. A portion of the data used to be hashed is static data that you can't change because it contains data about the block and transactions too or whatever. The other part is a random number that your miner tries. I think it's in sequence too so you don't try the same one twice. A third part is which address you are so they can give you 25BTC for solving it and that becomes part of the block.
In a pool, they just want you to prove that you're actually doing real work at the rate you say you are. So they'll take the network difficulty and low is by like 10,000 and every time your hash is below that limit, it counts as a share after they verify it was calculated correctly. So if you solve the block, is has the wallet address embedded in it so it's theirs when you solve it and you can't walk off with the 25BTC
![Tongue](https://bitcointalk.org/Smileys/default/tongue.gif)