The comic book industry is basically self-regulating. For decades pretty much all major publishers would adhere to a set of content standards called the Comics Code Authority. Those comic publishers who didn’t were considered “underground” and had difficulty getting their titles carried by most newstands and retailers (of course most “underground” publishers wore this like a badge of honor). Only on rare occasion would one of the “majors” step outside the CCA’s standards for a “special” issue or two (such as a Spider-Man plot dealing with drug addiction in teens).
The original Comics Code (first devised in 1954) was broadly similar to the original Hayes Code used by the motion picture industry through the late-1960s. The CCA would be somewhat modified over the years to adapt to societal changes. Overtime the CCA came to be considered less and less relevant. In 2001 Marvel, wanting to be less restricted with certain of its titles, abandoned the CCA in favor of its own self-applied ratings system for its titles. Other publishers soon started to follow suit and by 2011 the Comics Code Authority became completely defunct when, of all things, Archie Comics abandoned it.