Habit is the skill acquired by repetition of exercises. Acquiring a habit needs predisposition and memory. Predisposition is the ability to do something. For instance, a man can play football, but a tree cannot. Memory is also required, to remember previous acts and improve the following ones.
When you have a habit, human acts are more perfect, faster, and can be made with less effort. There are physical habits (manual work), mental (study) and moral (virtues).
Virtue is the habit of doing right. It is a perfection added to understanding, will or desire.
Virtues are seven: the three Christian virtues: faith, hope and charity, and the fourth cardinal ones: prudence, justice, fortitude and temperance.
Prudence is the virtue or perfection of understanding; justice is the virtue consisting of giving each person what is his own; fortitude is the virtue or perfection of will; and temperance or moderation is the virtue or perfection of desire.
Paganism stayed in these cardinal virtues. But the Christian world added the three Christian virtues. Faith is the virtue to believe in religion’s truths. Hope is the confidence in God to give us heavenly goods, and charity consists of loving God above all things and the neighbor as ourselves.