This is a great question. There is not one way to become virtuous. In other words, all people will differ on this answer. In light of this, let me give you a few suggestions.
First, some people will say that to become virtuous, one must work at it. In other words, virtuous behavior comes from creating good habits. Therefore, if a person develops these good habits, then virtues will come out.
Others, who are more religious, will say that virtue comes from having a religious experience. For Christians, they will say that virtue comes from imitation God. For example, Thomas a Kempis wrote the famous book, Imitation of God.
Still others will say that virtue comes out through philosophical thinking. In this approach there is an emphasis on the mind and intellectual matters. In other words, if a person is able to always make rational decisions, then they will be not only virtuous, but also happy.
Those who favor a sociological point of view might say that virtue comes from positive reinforcement from society. In the end, there are many opinions.