Most likely you are referring to filtering units in unit groups.
Area of effect spells for example affect several units at a time. So you pick a unit group who you want to damage.
But you filter out dead units, allied units and so on. There's no sense in damaging dead units.
So for each unit, you check that it is one that you really want to pick.