Calcium can lose 2 electrons hence the +2 charge. Chlorine can gain 1 electron hence the charge -1. when they transfer electrons there is an extra electron remaining this goes to another chlorine atom. That is why the chemical equation is CaCl2. Calcium gives two electrons to two different chlorine atoms.