An achievement emotion is a type of emotion experienced by learners tied to their ability to achieve specific learning goals.
At the most basic level, positive achievement emotions (such as joy, satisfaction, relief, happiness) are tied to the achievement of learning goals, or anticipation that one will be able to achieve them. Negative achievement emotions (such as sadness, anger, frustration) are tied to failure to achieve learning goals, or anticipation that one will fail to achieve them.
More complex achievement emotions include emotions related to anxiety or uncertainty about whether one has achieved or will be able to achieve learning goals. In cases where performance on test of learning has consequences for the learner, the anxiety could be tied to the test.
Achievement emotions tend to track with real or perceived changes in one's achievement levels and not just with the absolute levels.
Relation with epistemic emotions
Another learning-related type of emotion experienced by learners is epistemic emotion -- this is emotion driven by changes to the learner's epistemic state as a result of learning. Typical epistemic emotions include surprise, curiosity, and confusion. Epistemic emotions can trigger achievement emotions -- for instance, confusion can lead to frustration at one's inability to understand, or anxiety about one's test performance. However, they don't have to -- for instance, in the case of purely recreational learning where the learner has no prior expectation of being able to do well, confusion may not trigger achievement emotions.