Mix hydrochloric acid with sodium hydroxide, then boil off the water, and white crystals of sodium chloride are left. The acid supplied H+ and Cl−; the base supplied Na+ and OH−. The H+ and OH− became water, and the leftover pair, Na+ from the base and Cl− from the acid, is the salt. Change the partners and you get a different salt: sulfuric acid with potassium hydroxide gives potassium sulfate, K2SO4.
A salt's formula comes from balancing charges. Calcium ions are Ca2+ and chloride ions are Cl−, so it takes two chlorides per calcium: CaCl2. Aluminum, Al3+, with sulfate, SO42−, needs 2 and 3 to reach +6 and −6: Al2(SO4)3. The formula is a ratio, not a molecule. A grain of table salt is a lattice of countless ions, each Na+ surrounded by six Cl− ions.
Coming from a neutralization does not make a salt neutral. Sodium acetate, from weak acetic acid and strong sodium hydroxide, makes a basic solution, because acetate ions take protons from water. Ammonium chloride, from strong hydrochloric acid and weak ammonia, makes an acidic one. Only salts from a strong acid and a strong base, like NaCl or KNO3, give pH 7. Sugar and other molecular compounds are never salts, whatever they look like, because they contain no ions.
Think of it like this. A neutralization is like two dancing couples swapping partners: H+ leaves Cl−, OH− leaves Na+, and the two who left pair up as water. The partners left behind, Na+ and Cl−, end up together as the salt. The image stops at the crystal: there each ion is surrounded by several partners at once, not just one.
Core idea. A salt is an ionic compound: a cation, usually from a base, locked in a lattice with an anion, usually from an acid. Its formula balances the ion charges, and whether its solution is acidic, basic or neutral depends on how strong its parent acid and base were.