Elements in Group IA are the alkali metals: lithium, sodium, potassium, rubidium, cesium, and francium. These elements have several chemical and physical properties in common due to the fact that they all have one lone electron in their outer most energy shell. The outermost electrons are called the valence electrons and it is those electrons that determine many of an element's physical and chemical properties.
Because they have one single electron, they have a low ionization energy which means that they will easily lose that electron in chemical reactions and form positive ions (cations). The ease with which an atom loses its valence electron depends on, among other things, the distance from the nucleus of the atom. Lithium being the smallest group IA atom has its valence electron closest to the nucleus so it is the hardest of the group to remove. Francium is the largest of the group IA atoms and so it has the easiest electron to remove. The easier it is to remove, the more reactive it is thus lithium is the least reactive group IA and francium is the most reactive. (In fact, francium is the most reactive naturally occurring element.) Bottom line, the group IA elements will chemically react in such a way as to lose an electron and form a 1+ ion.
Group VIIA elements are the halogens: fluorine, chlorine, bromine, iodine, and astatine. Group VIIA atoms have seven electrons in their valence shell. Normally, group VIIA atoms will absorb one extra electron to become a 1- ion (an anion). Because they only will gain one electron, they have a high electron affinity. Electron affinity increases as the distance from the nucleus decreases, so flruorine is the halogen that is most likely to chemically react and astatine is the one which is least likely.
When a group IA atom is reacted with a group VIIA atom three things happen
The group IA atom loses its electron and becomes a positive ion.
The group VIIA atom absorbs that electron and becomes a negative ion.
Then the positive ion and the negative ion attract each other and form a chemical compound.
This process is called "creating an ionic bond." The following example highlights this process:
Na + Cl ---> NaCl through the following steps
Na -----> Na+ + e
Cl + e -----> Cl-
Na+ + Cl- -----> NaCl