The alpha-helix and beta-hairpin are the minimal secondary structure elements of proteins. Identification of the factors governing the formation of these structures independently of the rest of the protein is important for understanding the determinants and rules driving the folding process to a unique native structure. It has been shown that some alpha-helices and beta-hairpins can fold autonomously into native-like structures, either in aqueous solution or in the presence of an organic co-solvent; possible mechanisms of these processes have been considered in literature. The characteristic times for folding of alpha and beta structures are estimated from experiments, simple analytical theories and more detailed computer models. Our aim is to review recent experimental and theoretical studies of folding of alpha and beta structures focusing much attention on beta-hairpins.