As a typical example, suppose a contractor violated a building code when constructing a house. The house then collapses and somebody is injured. The violation of the building code establishes negligence per se and the contractor will be found negligent, so long as the contractor's breach of the code was the cause (proximate cause and actual cause) of the injury.
The Restatement (Third) of Torts § 14 (Tentative Draft No. 1, March 28, 2001) addresses negligence per se. Also see Grable & Sons Metal Prods. v. Darue Eng'g & Mfg., 125 S. Ct. 2363, 2370 (2005).