The process of manufacturing PVC pipes goes something like this:
Preparation. The first step is prepare the ingredients for the pipes. PVC is a produced by the chemical bonding of vinyl and chloride (the 'V' and the 'C'). After this is completed, excess gas and water is removed using a centrifuge.
Additives. In order to make the pipe different colours, and to produce PVC of different strengths and rigidity, additives are added to the basic PVC mix.
When the mixture is complete, it is then heated to melting point before being rolled and shaped in the required pipe shape and thickness.
This is a very simple explanation of how the pipes are produced. Here is a more detailed flowchart for the entire process from design to completion of manufacturing: