Proteins have four levels of structure - primary, secondary, tertiary, and quaternary - that determine their function. The primary structure is the linear sequence of amino acids in the polypeptide chain. Secondary structures form due to hydrogen bonding within the chain, resulting in alpha helices or beta pleated sheets. Tertiary structure describes the overall 3D shape of the protein formed by interactions between amino acid side chains. Quaternary structure involves interactions between multiple polypeptide subunits.