To some this could be considered to be more of a physics question, but I think Chemistry is more accurate. It is a fairly simple question, and it is - how do the same subatomic building blocks, proton, neutron, and electron form an atom of an element having different properties depending on the quantity thereof? Is it some sort of holistic interaction with other particles? Disregarding specifics, it's sort of like saying 3 bricks makes water and 4 bricks makes metal, how is this possible? Yes, I'm honestly asking. A complete answer is not necessary, and indication of what field of research to pursue to find treatment of this subject will suffice, although the more thorough the explanation, the better.