Affirmation means: To state that something is real and true. It means that we confirm the reality of a goal, situation or action. Affirmations are sentences aimed to affect and program the conscious and the subconscious minds, so that in turn, they change our behavior, thinking patterns, habits and environment.
The words composing the affirmation, often, bring up related mental images into the mind, which inspire, energize and motivate.
The words you repeat, and the resultant mental images, get engraved on the subconscious mind, which in turn, changes the behavior, habits, actions and reactions according to the repeated words.
This technique, like creative visualization, utilizes the law of attraction.