Lots of answers here, but none of them has actually answered the question "what is a share?"
In almost all mining pools, a share is a block "solution" not quite good enough to be published as an actual block, but still good enough that it's really hard to find them. This means that shares can be used to measure how much work you're doing, but just with much finer and more consistent granularity than actual block solutions, which are far too rare for small miners.
So, just as an example, suppose that the current difficulty was 10,000. To become valid blocks, an attempted block with a specific nonce has to be "better" than 10,000. In this situation, the pool might set their "share difficulty" at 100. So with each nonce you try, your software will check to see how "good" the difficulty of the resulting block is. Most of these blocks will be below 100 in "difficulty level", but a small amount of them will be over 100 in difficulty level (and still less than 10,000). These "better than 100 but still less than 10,000" blocks are the ones we're calling the "shares". They can be sent into the mining pool, even though they aren't good enough to be published on the open network as actual blocks. Inside these shares the mining pool will be clearly marked as the recipient of any potential block reward, which means that the mining pool can use the number of shares you submit as unfakeable evidence of how much work your machine is doing to try and find blocks for the pool, even if you've never found one yet. Which is good, because it takes forever to find actual blocks.
As you mine along, happily submitting shares, then every once in blue moon you will come across a solution that is not only good enough to be a share, it's actually good enough to be a real block! That is, it has difficulty "over 10,000" and so it meets not just the share criteria but the full network standard of difficulty, which is much harder. This one you would still submit to the pool, but when they get it they will go ahead and publish it out over the actual network, receiving a nice fat reward that gets distributed amongst everyone according to the shares they've been submitting. Of course, these aren't real numbers, and most software works by just telling your machine to look for blocks over 100 and not worry about what the network difficulty is. But still, we can see how someone who isn't doing actual mining would never be able to find any shares in the first place, which means this is actually reasonably secure from the pool's perspective as a way of measuring how much work everyone is doing.
I've glossed over a lot of details here, because there are some subtle tricks the pool needs to be careful of (block withholding attacks anyone?), but that in a nutshell is what shares actually are: totally normal blocks that don't meet the full requirements to be published on the network, but still meet some smaller requirement set by the pool to count as proof you're mining with the pool set as the recipient.
Now, why can't the miner just submit any actual blocks themselves to take the whole reward? Two reasons: first, in order for their shares to be valid they have to have the pool set as the recipient, so the mined block already gives the reward to the pool no matter who broadcasts it, and second (as indicated by zanzu) the pool doesn't actually bother giving the whole block out to miners, just a template for the header that contains the hashes of the actual block contents).
What the miner could do is secretly throw away the valid block instead of sending it back to the pool. That would hurt the rest of the pool more than the miner because only a small portion of the reward from it would have actually come back to them, and for a bunch of complicated game theory reasons this could maybe result in an advantage if the same miner also had a lot of other mining power not on the pool at all. (This is the "block withholding attack" I mentioned above). But it starts to be noticeable in the statistics if you do it a lot, and also it doesn't provide any benefit to the typical small-time miner. So these attacks are presumed to be fairly rare. There are certain types of reward schemes that are more or less resistant to the strategy, but most people don't seem to be very concerned about these attacks in general. So all in all the basic "share" strategy is pretty much good enough.
TL;DR: shares are "failed blocks" that a pool uses as evidence of a small miner's participation.