More explicitly, an action counts as virtuous, according to Aristotle, when one holds oneself in a stable equilibrium of the soul, in order to choose the action knowingly and for its own sake. This stable equilibrium of the soul is what constitutes character.
By acting as the virtuous person acts, doing what one should when one should and in the way one should.