An enzyme is a type of protein, and proteins are made up of amino acids. The sequence of amino acids determines the shape of the enzyme, which in turns controls which substrates will or won't fit into the active site. Individual amino acids join together using peptide bonds to form polypeptide chains. This is known as the primary structure of a protein. Depending on the sequence of amino acids, the polypeptide chain may form either an alpha-helix or a beta-pleated sheet based on the properties of the amino acids (e.g.: some may form ionic bonds with one another, others may form hydrogen bonds if they are polar). This is known as the secondary structure of a protein.
Several secondary structures (which may be composed of just one, or sometimes several, polypeptide chains) can then interact to form the tertiary structure. Again, the shape of the tertiary structure is controlled by interactions between the amino acids based on their molecular properties and their position relative to each other. If two or more tertiary structures combine, they form the quaternary structure of the protein. Enzymes can be tertiary or quaternary proteins.