We review the generalized-ensemble approach to protein studies. Focusing on the problem of secondary structure formation, we show that these sophisticated techniques allow efficient simulations of all-atom protein models and may lead to a deeper understanding of the folding mechanism in proteins.