Sodium Chloride is an ionic compound made of the ions Na+ (sodium) and Cl- (chloride). It's formula is NaCl. It's electrically neutral because the 1:1 ratio of Na+ to Cl- gives it an equal number of positive and negative charges.
The neutral sodium atom has 11 protons (positively charged) and 11 electrons (negatively charged). Like all elements in Group 1, it loses one electron. This gives it a charge of +1 since the ion still has 11 protons but only has 10 electrons.
Similarly, a neutral chlorine atom has 17 protons and 17 electrons but it gains one electron to give it a net charge of -1.
Ionic compounds are always neutral. They are made of positive and negative ions that attract in a ratio such that positive and negative charge cancel out.