The tertiary structure of a protein is the overall specific 3D shape of a protein, determined by interactions between r groups and the properties of those r groups.
Some proteins stop at the third level but some carry on to the fourth level if they have another chain or more than one chains or they have prosthetic groups or both.
The bonding of the different chains and these prosthetic groups results in the formation of proteins with very complex and unique quaternary structures.
The bonds that maintain the structure of proteins can be broken if the temperature or the pH is altered, causing the protein to become denatured and lose its shape, preventing it from carrying out its function.
The quaternary structure of a protein is the specific 3D shape of a protein determined by the multiple polypeptide chains and or prosthetic groups bonded together.