Standards are sets of technical guidelines published by standards-developing organizations (SDOs).
Regulations (such as the Code of Federal Regulations) are administrative laws of regional and federal government agencies of the United States or other countries.
When a government regulation requires a certain standard be followed, that standard technically becomes a law. SDOs tend to refer to these standards as incorporated by reference (IBR). Other people more commonly refer to IBR standards as codes.
So a code is very much like a standard, except that is has been officially adopted by a governmental body. Following regular standards may be expected, but is ultimately voluntary. Following codes is legally mandatory.
Note: Although there are many publications called codes--such as The National Electrical Code and the ASME Boiler and Pressure Code--not every legally-mandated standard is called a code or exists as a stand-alone publication.
Codes, like regular standards, are published by standards-developing organizations (SDOs). When a standard is becomes a code, though, the SDO has to make it "reasonably available" to those who are impacted, which can include designers, manufacturers, and consumers. So codes can sometimes be read online for free. Downloading, printing, or ordering a paper copy will still have a cost involved.
Some SDOs have special sites to view their standards that have become codes. Below are a few examples.
Covers engineering disciplines including: aerospace, biomedical, chemical, civil, and environmental.
American National Standards Institute (ANSI): Incorporated by Reference Portal
Underwriters Laboratories (UL) Incorporated by Reference Standards (registration required)
National Fire Protection Agency (NFPA) (registration required)