Ultimately, gameplay ends up being about providing a series of rewards to the player. In old arcade style games, this was represented by a score measurement; the score was a mystical representation of the value of the player's success, be it how long they'd survived, how many times they hit a target, avoided an enemy or otherwise achieved whatever goal the game deemed "success". This provided the ability to players to compare scores and see how well they did against each other. I'm sure anyone who remembers arcades or old console systems remembers competing to get their initials on the leaderboard displayed by the game.
Who wants top score?
In modern games, you've still got measurements like that. You can measure your stars in Angry Birds or your top score in Bejeweled. In first person shooters, you can compare your rank against other players, or kill/death ratios, or win/loss ratios, or countless other statistics used to measure a player's overall "skill level". Starcraft and Heroes of Newerth continually adjust the rankings of individual players based on their performance. This comes down to wins in games or otherwise performing "good" actions. Players will frequently want to see how they go against other players, or even see if they're making improvement against themselves. The question then that remains is how to tell the player that they are doing something "right".
The essence of this is training the player to play a game. This is the simple mechanics of "how do I move?", "where do I go?", "how do I interact with that?". Some things may be evident from their appearance. If you see a big angry looking guy with a gun and he's pointing it at you, in most cases you're probably safe to assume that you either want to get out of the way or shoot him before he shoots you. Many players might assume that a large white pack with a red cross in the middle might be something that would give them health, but you need to make sure of that the first time it happens. Basically you need to train the player that "if they take action X, they will end up with result Y". This is letting the player know how to play the game.
Sonic: run right, collect rings
The thing as a designer to make sure of is that this experience is kept consistent. If a player suddenly gets a different result from the action they've always performed, there needs to have either been a clear warning that this would happen before they've done it, or a clear indication immediately afterwards as to why this occurred. Take Baldur's Gate and the cry of "My sword has no effect" when a character was unable to hurt an enemy because they needed a different/more powerful weapon in order to deal damage. This immediately told the player "you're not getting the desired result, so you need to try something different". To fail to give the player some kind of audio or visual cue as to this difference will only leave them annoyed and frustrated. It should only be done when you have a specific reason for breaking their expectation.
In this vein, take "I Wanna Be The Guy". This game deliberately sets out to confound the player by building an expectation and then breaking it. For example, while walking under a tree, an apple falls down and can kill the player. However, not all of the apples in the tree fall, so it's up to the player to work out (through trial and error) which ones do and don't fall. After this, the player can jump on ledges above the trees. At this point they discover that the remaining apples will actually fly UPWARDS and potentially kill them as they jump over the top of the trees. This deliberate breaking of the player's expectation is specifically designed as a challenge (and presumably to infuriate), to the player to force them to learn and remember exactly what to do and how and where to do it. This is the game's specific design. Do not expect to be able to get away with this tactic unless that is your express aim, and that you make it very clear from the start that the player cannot rely on any of their expectations.
Severe gaming frustration. Warning: contains strong language
Simple things like taking/avoiding damage are simple quantifiers for players to use to measure their intermediate success in gameplay, just like point scores. Point scores can also be adapted to a more ongoing measure - experience. By completing actions, players are rewarded with experience, which lets them know they have made progress within the game itself as well as in their character. Experience gives a player a quantifiable measure of advancement within the game, as can see something direct to work towards. In effect, it's giving the player a reward for performing.
An important part of these kind of rewards is making it clear what the player is receiving a reward for. Is it for performing well in gameplay? Is it for reaching a particular point in the game? Is it a time based bonus? When showing a reward, it's helpful to tell the player what that reward is for, so that they will attempt to continue to emulate that sort of behaviour or performance. Player completing a fight without taking damage or missing a shot like to receive rewards for that success, and are right to do so.
That said, there are potentially some issues with rewarding specific types of behaviour, which is what I'll discuss in my next post.