A virtue is a generalized pattern of behaviour that is usually somehow beneficial in terms of its outcome. A vice is one that is instead often harmful to the individual or society at large. "Beneficial" and "harmful" need to be put in relation to certain social goals.