Actually Welcome to the Concept of the Chemical Bonding.
Since we know that, calcium shares 2 electrons and Bromide being a halogen accepts 1 electron at a time,
So 2 bromides combine together to form a bond with Calcium, so we get as,
Ca2+ + 2Br -----------------------> CaBr2
CaBr2 is the compound formed.