Morality refers to principles concerning the distinction between right and wrong behavior. It involves understanding the difference between right and wrong and living according to that understanding. Ethics is the philosophy of how morality guides individual and group conduct. While closely related, morality provides the foundation for ethics. Views of what is moral can change over time as societies' attitudes shift. Justice is an aspect of morality that concerns fair treatment of different classes of individuals. The law provides set rules to govern behavior and be applied universally by courts, while morality represents social norms applied by society through social condemnation rather than legal penalties. Issues of law and morality are not always aligned, as not all illegal acts are considered immoral and not all immoral acts are illegal.