Sodium chloride (NaCl) is a chemical compound and belongs to a large class of ionic salts. Salt is a mineral substance consisting primarily NaCl. Salt in its natural form has crystal structure and is known as rock salt.
Sea water is a major source of salt. It has a salinity of 3.5% which means there 35gms of dissolved salts per kg of sea water. Evaporation of seawater is the preferred method of producing salt in marine countries. Shallow artificial ponds, called salt pans or evaporation ponds, are created. Sea water or brine is fed into these large ponds. Water is drawn out through natural evaporation. Subsequently salt is harvested. You can see these white salt evaporation ponds when passing by road/rail line close to a sea/ocean. Sometimes these ponds have vivid colors, ranging from pale green to bright red, due to the presence of algae and other micro-organisms.
Common table salt is a refined salt containing approximately 98% NaCl. The remaining 2% are agents added to make it free flowing, moisture absorbers to prevent formation of clumps and iodine to address health concerns.