Yeah you got it right. You are trying to emulate how real world materials behaves and you have a set of parameters to make it so, in other words your nodes. If you are trying to reproduce a material such as plastic, or gold, fabric, surface imperfection, by setting up your node chain you are building a shader and it is comprised of textures and all the other set of rules you set, like metallic, roughness, IOR, etc.
Almost like a chef adding flour, butter, eggs, milk, mixing them, setting a chain of instructions like temperatures and cooking time, a bit of salt, a pinch of cinnamon and in the end your result is a pancake. Well a 3D artist is building his material or shader by adding a bit of roughness, setting his IOR, a texture here and there, setting the specularity and in the end you get your material.