Hello, Amya,
The proportions of elements that bond, such as Na and Cl, is dependent on the electron configuration. Na is at the far left of the periodic table, in the Group One elements. If you've studied electron configuration terminology, it has a simplified configuration of [Ne]3s1. In other words, it has one more electron than the inert gas neon (Ne) in the 3s orbital. If it can lose this electron, it's remaining electron takes on neon's stable electron configuration, with all the valence orbitals filled. That holds true for all group 1 elements. When any of them lose one electron, the remaining electrons take on the stability (low energy) of the preceding Group 18 noble gas.
Chlorine (Cl) has the "opposite" situation. Any of the Group 17 elements (the halogens) only need one additional electron to take on the electron configuration of the noble gas just to it's right. That would be argon (Ar) in this case.
For this reaction, the needs of both elements (to reach a stable Group 17 electron configuration) is matched: Just one electron is provided (Na) and taken (Cl) and that forms a single bond. Both elements are "happy:" no additional bonds are needed to reach their lower energy states. The outermost electrons of an element are termed the "valence electrons." These are the electrons in the highest orbital shell, which are the 3s and 3p electrons. So it only one sodium atom is needed to fill one chlorine atom's last open orbital to reach an 3s23p6 stable configuration, leaving sodium's atom with a 2s22p6 configuration.
If we had to predict what would happen with Ca and S, note which groups they are in and what would be needed to change their electron configurations to resemble their nearest noble gas. For Ca, it would have to lose 2 electrons to have a configuration equivalent to argon. Ca is in Group 2 (the alkaline earth metals). All Group two elements are willing to give up two electrons to take on the more stable noble gas configuration nearest them.
For a Ca bonded to S, we can tell from the periodic table that sulfur would love gaining 2 electrons to complete it's outer shell (to go from [Ne]3s23p4 to an argon (Ar) configuration. We can see that we have two consenting elements who both agree to a deal where two electrons would be taken from a Ca atom by a S atom, since both would then have completed outer orbitals. It can be said that Ca has two "valence" electrons and that S needs two electrons to bring it's valence electrons to 8 (3s23p6). So a 1:1 match would satisfy both elements, resulting in a calcium sulfide (CaS) molecule.
I hope this helps,
Bob
================================================
If you like to visualize why the elements react the way they do, here's one:
Periodic Table Weekly is the source for best-dressed elements. The outfits (electron configurations) worn by the noble gases are the envy of the rest of the Periodic Table. The elements all use E-Bay (Element Bay) to buy and sell electrons. The Group 1 elements are all offering one electron for bargain prices. The Group 17 elements are bidding furiously for them. Once traded, each element then has a noble gas garment. The Group 2 elements are offering 2 electrons, and are getting brisk business from the Groups 15, 16, and 17 elements, plus some good bids from Groups 13 and 14. Each transaction provides outer shell garments that they think will get them coverage in the next Periodic Table Weekly. CaCl2, Na2S, CH4, HI, and MgO are all hoping for a feature article.