What "code" applies to projects that I do in my own home?
You need to contact your local building department.  In the U.S., most of the residential building regulations exist at the state level, but in many states the codes can be amended by counties and even individual towns.

The International Residential Code and its competitors are "model codes."  States often adopt model codes (with local modifications) to avoid the cost and hassle of writing their own codes from scratch, and also because it is beneficial for codes to be harmonized so that the same building materials can be used in different locations.