The instruction for how they will fold their 3D shape is encoded in their unique amino acid structure. This will occur because both bonding between the peptide backbone or secondary structure as well as many kinds of covalent and non-covalent interaction between the tertiary structure or the side chains.