When standards are adopted by a governing body they become part of the regulatory code of that body. These standards (regulations or code) are no longer voluntary and must be adhered to by the affected parties. For example the Code of Federal Regulations is the codification of standards accepted and made into law by the U.S. government.
Engineers frequently encounter building codes. See the Building Codes tab of this guide for more information.
Standards.gov provides a thorough explanation of the difference between standards and codes/regulations: