So, in the case of NaCl, the sodium atom is the cation, meaning it's lost an electron and has a positive charge. This makes sense, since sodium is a pretty reactive element that's always looking to lose an electron or two to become more stable. It's like sodium is the social butterfly of the atom world, always looking to make new friends and shed its extra electrons.
But what's really cool is that when sodium loses that electron, it becomes a positive ion, which is then attracted to the chloride ion, which has a negative charge. It's like they're two old friends who are meant to be together, and they're drawn to each other like magnets. This attraction is what holds the NaCl molecule together, and it's what makes table salt so stable and useful.