The formation of the tertiary structure of proteins.