A leaving group is a part of a molecule that can break away (leave the molecule) during a reaction, and in doing so takes with it the electrons that make up the bond that is breaking. A leaving group can be thought of like a nucleophile working backward: Accepting an electron pair as a bond is broken - and indeed the second part of a nucleophilic substitution reaction is the leaving group breaking away.

The key factor contributing to a species' suitedness as leaving group is its basicity: The weaker the base, the better the leaving group. Read more about the connection between leaving groups and basicity here.

Halogens are often used as the leaving group, e.g. in alkyl halides. The general order of "ability to leave" for them is I > Br > Cl > F. But there are exceptions for specific reaction environments!