When chlorine reacts with sodium bromide, we get a displacement reaction, in which chlorine will replace bromine. The balanced chemical reaction is:
`Cl_2 + 2 NaBr -> 2 NaCl + Br_2`
That is, we end up with sodium chloride and bromine. Chlorine and bromine, both are halogens (members of halogen group in periodic table along with fluorine, iodine, etc.). Both of them are electronegative and need 1 electron to achieve a fully filled electronic configuration. However, chlorine lies above bromine in periodic table, which means it has a smaller size and is capable of attracting electrons by a higher degree as compared to bromine. That is, chlorine is more electronegative as compared to bromine. Hence chlorine will be able to replace bromine from a compound (as seen in the chemical reaction in this case).
Hope this helps.
When you mix the two chemicals, you get what is known as a single-replacement reaction (also known as single displacement, single substitution, or activity replacement).
Here is the reaction:
Cl2 + NaBr----> NaCl + Br2
Since chlorine is in its elemental form, it exists as a diatomic particle. Also, since it is a nonmetal (something that tends to gain electrons), it replaces the nonmetal NaBr (which is Br). This reaction results in a salt (NaCl) and elemental bromine, which also exists as a diatomic.