Polypeptide chains fold spontaneously into defined patterns to make functional proteins. This process involves the polypeptide chain going from a disordered, random structure to a highly ordered one. How is this not a violation of the Second Law of Thermodynamics?
When assessing entropic contributions to Gibbs Free Energy for the purpose of determining spontaneity, you must not look only at the system, but also at the surroundings. It is true that the entropy of the protein decreases when it is folded because the chain is arranged in a more orderly fashion. However, there are other entropic considerations in the surroundings of the protein. In an unfolded protein, all of the hydrophobic portions of the polypeptide are exposed to the aqueous environment, and the water molecules order themselves around the hydrophobic residues in ordered structures called hydration spheres. As a protein is folded, these hydrophobic residues initially exposed to the aqueous environment are buried in the interior of the protein, hidden away from contact with water molecules, and the entropy of the water molecules increases as the need for hydration spheres diminishes, in effect overcoming the entropy decrease for the protein alone. In other words, while the entropy of the system (the protein) decreases, the entropy of the surroundings increases to a greater degree, leading to an overall increase in entropy for the universe.
The folding of a protein also provides an example of the "DH" and "-TDS" terms competing with one another to determine the DG of the folding process. As described above, the change in entropy of the protein as it folds is negative, so the "-TDS" term is positive. However, in addition to entropic effects there are enthalpic contributions to protein folding. These include hydrogen bonding, ionic salt bridges, and Van der Waals forces. An input of thermal (heat) energy is required to disrupt these forces, and conversely when these interactions form during protein folding they release heat (the DH is negative). When all of these entropic and enthalpic contributions are weighed, the enthalpy term wins out over the entropy term. Therefore the free energy of protein folding is negative, and protein folding is a spontaneous process.