The chemical formula for calcium chloride, CaCl₂, hows that the compound contains two chlorine ions for every calcium ion.
Ca is a group 2 element with 2 electrons in its outer shell. Cl is a group 7 element with 7 electrons in the outermost shell.
When it forms an ionic compound, electrons are transferred from Ca to Cl.
Ca gives out 2 electrons becomes Ca²⁺ and Cl can take only one electron -Cl⁻ and become stable. Therefore 2 Cl atoms are needed to take in the 2 electrons and be stable.
Therefore compound formed between 1 Ca²⁺ ion and 2 Cl⁻ ions.