Basically, an halogen with more electronegativity property displaces an halogen with less electronegativity properties. The one that has less electronegativity acts as the reducing agent, they lose their electrons, this electrons are received by the more electronegative halogen.