There is an electromagnetic charge like Strange answered however there is also a slight force of gravity between them. The force of gravity wouldn't make much difference to the net force acting on the atoms though as their mass is very small and the separation of charge is large in this case.
The Na atom and the Cl atom of the molecule NaCl form what is known as an ionic bond. Basically the Sodium atom (Na) has a positive charge, while the chlorine atom (Cl) has a negative charge. Just like with magnets, the positive and the negative charge attract to each other.