There are various features selections techniques. The most common techniques rank individual features by how much information they bring with respect to the target, for example with information gain or conditional entropy.
Techniques based on individual features are efficient (i.e. fast) and usually help to reduce dimensionality and improve performance. But they are not necessarily optimal, because they cannot take into account the contribution of a subset of features together. For example they might select several features which are highly correlated between each other, even though selecting only one of them would be enough.
In order to take into account how features interact, ideally one would train and test a model with every possible subset of features, and then select the best one. However the full exploration of $2^N$ subsets is rarely feasible, but some optimization methods can be used, for example feature selection with genetic learning.
Note that there are also features extraction techniques. In this case the original semantic of the features is not preserved, since the whole set of features are transformed into a new representation.