Some useful definitions:
A set of standards established and enforced by local government for the structural safety of buildings. (WordNet Search)
Laws, usually but not always enacted by local government units, that set
safety and fire protection standards. These codes affect the materials
and methods used in the construction of buildings. For example, a code
provision might require sprinkler systems in motel rooms.
(American Banker: Banker's Glossary)
Many local (city and county) codes are based on these codes and the California Building Standards Code (see box below). If you are working on a project in a specific area, be sure to find out what codes apply to that jurisdiction.