First off, you can do dimensionality reductiondimensionality reduction of features independent of any particular prediction problem, i.e. representation learning.
In the context of prediction problems, sparsity-promoting regularizationregularization can be used to automatically perform feature selectionfeature selection. This is commonly accomplished using $L_1$ penalties such as LASSOLASSO for linear regression (and also in deep learning).
($L_1$ regularization is also used in representation learning, such as sparse codingsparse coding and sparse autoencoders).