It states that if more than one type of ions are attracted towards a particular electrode, then the one discharged is the ion which requires least energy. The potential at which the ion is discharge or deposition potential.
it depends upon the E0 (CELL) value and the size of cations and anions and also the nature of electrode .