Crime is the breach of rules or laws for which some governing authority (via mechanisms such as legal systems) can ultimately prescribe a conviction. Individual human societies may each define crime and crimes differently, in different localities (state, local, international), at different time stages of the so-called "crime" (planning, disclosure, supposedly intended, supposedly prepared, incomplete, complete or future proclaimed after the "crime").
While every crime violates the law, not every violation of the law counts as a crime; for example: breaches of contract and of other civil law may rank as "offences" or as "infractions". Modern societies generally regard crimes as offences against the public or the state, as distinguished from torts (wrongs against private parties that can give rise to a civil cause of action).
When informal relationships and sanctions prove insufficient to establish and maintain a desired social order, a government or a state may impose more formalized or stricter systems of social control. With institutional and legal machinery at their disposal, agents of the State can compel populations to conform to codes and can opt to punish or attempt to reform those who do not conform.
Authorities employ various mechanisms to regulate (encouraging or discouraging) certain behaviors in general. Governing or administering agencies may for example codify rules into laws, police citizens and visitors to ensure that they comply with those laws, and implement other policies and practices that legislators or administrators have prescribed with the aim of discouraging or preventing crime. In addition, authorities provide remedies and sanctions, and collectively these constitute a criminal justice system. Legal sanctions vary widely in their severity, they may include (for example) incarceration of temporary character aimed at reforming the convict. Some jurisdictions have penal codes written to inflict permanent harsh punishments: legal mutilation, capital punishment or life without parole.
Usually a natural person perpetrates a crime, but legal persons may also commit crimes. Conversely, at least under U.S. Law, nonpersons such as animals cannot commit crimes.
The sociologist Richard Quinney has written about the relationship between society and crime. When Quinney states "crime is a social phenomenon" he envisages both how individuals conceive crime and how populations perceive it, based on societal norms.