There are nearly 100 000 different protein sequences encoded in the human genome, each with its own specific fold. Understanding how a newly formed polypeptide sequence finds its way to the correct fold is one of the greatest challenges in the modern structural biology. The aim of this thesis is to provide novel insights into protein folding by considering the problem from the point of view of statistical mechanics. The thesis starts by investigating the fundamental degrees of freedom in polypeptides that are responsible for the conformational transitions. This knowledge is then applied in the statistical mechanics description of helix?coil transitions in polypeptides. Finally, the theoretical formalism is generalized to the case of proteins in an aqueous environment. The major novelty of this work lies in combining (a) a formalism based on fundamental physical properties of the system and (b) the resulting possibility of describing the folding?unfolding transitions quantitatively. The clear physical nature of the formalism opens the way to further applications in a large variety of systems and processes.