A virtue (or vice) is acquired through practice— repeated activity that increases our proficiency at the activity and gradually forms our character. Alasdair MacIntyre describes a child earning to play chess to illustrate the process of habit formation. Imagine, writes MacIntyre, that in hopes of teaching an uninterested seven-year-old to play chess, you offer the child candy—one piece to play, and another piece if the child wins the game. Motivated by his sweet tooth, the child agrees. At first, he plays for the candy alone. (And he will cheat to win, in order to get more candy.) But the more the child plays, the better at chess he gets. And the better at chess he gets, the more he enjoys the game, eventually coming to enjoy the game for itself. At this point in the process, he is no longer playing for the candy; now the child is playing because he enjoys chess and wants to play well. And he understands both the intrinsic value of the game and the way cheating will now rob him of that value. He has become a chess player. Moral formation in virtue works much the same way.
We often need external incentives and sanctions to get us through the initial stages of the process, when our old, entrenched desires still pull us toward the opposite behavior. But with encouragement, discipline, and often a role model or mentor, practice can make things feel more natural and enjoyable as we gradually develop the internal values and desires corresponding to our outward behavior.