The ability of proteins to spontaneously form their spatial structures is a long-standing puzzle in molecular biology. Experimentally measured rates of spontaneous folding of single-domain globular proteins range from microseconds to hours: the difference - 10-11 orders of magnitude - is the same as between the lifespan of a mosquito and the age of the Universe. This review (based on the literature and some personal recollections) describes a winding road to understanding spontaneous folding of protein structure. The main attention is given to the free-energy landscape of conformations of a protein chain - especially to the barrier separating its unfolded (U) and the natively folded (N) states - and to physical theories of rates of crossing this barrier in both directions: from U to N, and from N to U. It is shown that theories of both these processes come to essentially the same result and outline the observed range of folding and unfolding rates for single-domain globular proteins. In addition, they predict the maximal size of protein domains that fold under solely thermodynamic (rather than kinetic) control, and explain the observed maximal size of "foldable" protein domains.