As previously discussed it is permissible to separate from a mixture if all three of the following conditions are met: 1) you must separate the item you want from the item you do not want [good from bad], 2) it must be for immediate use, and 3) you can only use your hand as opposed to a utensil.
This includes even if the mixture contains mostly good [and only a minority was bad] (Shulchan Aruch 319:3). As an aside, even though in this situation, when separating on Yom Tov one would be obligated to remove the bad from the good [because there is less effort involved, which is included in the mitzvah of enjoying Yom Tov], on Shabbos you may only take the good (Mishneh Berurah 319:18).
It is important to note, in terms of defining what is considered "good" and "bad," in addition to a situation where there is clearly something spoiled or rotten, if there are two perfectly good items, one you want and one you do not want, the desired item is considered "good" and the undesired item is "bad" (Mishneh Berurah 319:12).
Consequently, it is prohibited to pull out bones from meat or fish (Biur Halachah 319:4 s.v. mitoch), seeds from melon (Chazon Ish 56), flies from a drink or soup (Taz 319:2), or the fat on top of the soup (Mishneh Berurah 319:55). In each of these cases the undesired was removed from that which is desired.
This concept applies even if the only way to reach the sought-after item is to remove the unwanted item. For example, if there is an excessive amount of fat on top of soup, blocking access to the food, it is prohibited to remove the fat (Mishneh Berurah 319:55, 61 & 62). Seemingly, this raises a question: is it permitted to peel a fruit [e.g. an orange], for one removes the "undesired" peel from the "desired" fruit?
The Biur Halachah [321:19 s.v. liklof] explains it is permitted to remove the peel away from the fruit since it is impossible to reach it any other way, and additionally, this is the normal way of eating, for in order to be permitted you need both conditions: 1) no other way and 2) it is the normal way of eating (i.e. a natural step towards eating). However, in the above scenario of removing the fat away from the soup, since in many situations one does not have to remove before eating the soup [e.g. it was already skimmed off] it is not considered the normal process of eating and not included in the permissibility of peeling (Zachor V'Shamor pg. 284 ftnt. 56).
If one does not want either food now, but he does want them both at a later time, even though they are technically both "good" it is nevertheless prohibited to sort them (Biur Halachah 319:3 s.v. ha'yu).
It is important to note that the above halachos only apply when there is a mixture of both something desired and undesired. If, however, there is a mixture of two things which are undesired, the implication of the Biur Halachah [319:3 s.v. ha'yu] is that it is not a violation of borer to separate one from the other. Therefore, it would be permitted to pour soup containing particles of food that is being thrown out through a drain [which is a utensil that is designed to separate], thus separating the solids from the liquids, since both the soup and the particles are considered "undesired" (Sefer Aiyal Meshulash 7:42).