Law enforcement is any system by which some members of government act in an organized manner to enforce the law by discovering, deterring, rehabilitating, or punishing people who violate the rules and norms governing that society. Although the term encompasses police, courts and corrections, it is most frequently applied to those who directly engage in patrols or surveillance to dissuade and discover criminal activity, and those who investigate crimes and apprehend offenders, a task typically carried out by the police, sheriff or another law enforcement organization. Although law enforcement may be most concerned with the prevention and punishment of crimes, organizations exist to discourage a wide variety of non-criminal violations of rules and norms, effected through the imposition of less severe consequences. There are also different units in different police departments, including "Undercover", "Detective", "CID", "Gang Task Force", "Drug Task Force", "Custody Enforcement" (see Custody officer), this varies from jurisdiction to jurisdiction.
Most law enforcement is conducted by some type of law enforcement agency, with the most typical agency fulfilling this role being the police. Social investment in enforcement through such organizations can be massive, both in terms of the resources invested in the activity, and in the number of people professionally engaged to perform those functions.
Law enforcement agencies tend to be limited to operating within a specified jurisdiction. In some cases, jurisdiction may overlap in between organizations; for example, in the United States, each state has its own statewide law enforcement arms, but the Federal Bureau of Investigation is able to act against certain types of crimes occurring in any state. Various specialized segments of society may have their own internal law enforcement arrangements. For example, military organizations may have military police.