The PTR-91 is a clone of the HK-91, which is in turn a semiauto version of the German G3 selective fire battle rifle.
The CETME is the forerunner of the G3. It was developed by German engineers working at CETME in Spain just after WWII, and is largely based on the StG45 design that never made it into production in Germany before the war ended. In the 1950s, the German Army needed new rifles to replace the M1 Garands its troops had been given after the war. It first tried to obtain a license from FN to let it make FAL pattern rifles in Germany. When the Belgians insulted the Germans, they instead went to Spain's CETME and licensed the rights to the CETME design. The Germans then made some modifications and improvements to it, which resulted in the G3 design, later produced for civilian markets by Heckler & Koch as the HK-91.
I can't tell you exactly what the difference are, as I'm not that much of an expert. I do know, for instance, that the sights are a little different. Some other parts are also not interchangeable, while others are. They look alike, though, and function in exactly the same way.