It’s based mainly off the materials its made of, and the thickness property in the armor. Look in materials.json and you’ll see that the differing materials have varying levels of cut, bash, fire resistance, etc defined.
I’ve yet to figure out the raw math behind it. In most cases, for single-material armor, it seems to just be the material’s armor value multiplied by thickness, but not 100% sure, and multiple materials seem to alter this.