the sequence of amino acids is the primary structure, a diffrent primary structure means it folds differently due to different bonds being formed hence different secondary structures are formed ( beta-pleated sheets, alpha helixes), and just generally tertiary structure is the overall structure of the protein which completely depends on how the chain is folded (and how it's folded depends on primary structure because of different bonds)