courts or police may enforce this system of rules and punish people who break the laws, such as by paying a fine, or other penalty including jail. in ancient societies, laws were written by leaders, to set out rules on how people can live, work and do business with each other. but many times in history when laws have been on a false basis to benefit few at the expense of society, they have resulted in conflict. to prevent this, in most countries today, laws are written and voted on by groups of politicians in a legislature, such as a parliament or congress, elected (chosen) by the governed peoples. countries today have a constitution for the overall framework of society and make further laws as needed for matters of detail. members of society generally have enough freedom within all the "legal" things they can choose to do. an activity is "illegal" if it breaks a law or does not follow the laws.