Protein folding, unfolding and misfolding: Role played by intermediate states