Proteins are made up of subunits called amino acids.
Each amino acid has an alpha-amino, alpha carboxyl and an alpha carbon. An R group is what differs from the amino acids.
An R group can be a polar or non-polar or positive or negative charged. The properties of the amino acid chains will determine how the amino acid chain will fold.