Pipes together with wire are basic building materials of technology. There are many ways to make pipes. Usually, in history clay, copper, bronze, and lead were used as pipe material as they all are very malleable, in uptime material of choice is plastic. All of those metals are suitable for pipe production except lead. Lead is poisonous metal and not a good choice for pipe material especially for pipes that carry water. A good choice for a water pipe is copper, steel, or cast iron.
The first and simplest way is to take a sheet of metal, wrap it around a cylindrical object and weld it close. A modification of this process calls for a continuous sheet of steel that is preheated and then forms into a spiral and then weld. This enables continuous pipes to be made, unlike a sheet method that is limited by the size of the sheet that can be manipulated.
The other way to make a pipe is to liquefy iron and pour it into a spinning die. The die has to be as long as the required length of the pipe segment. Unlike the spiral pipe method this method can not produce continuous pipe, but it can create stronger pipe segments that are then connected together. The dye has cool water pumping around the interior of the die walls and as it rotates horizontally hot iron is poured from the back of the dye to the front. Rotation of the dye evenly distributes the molten iron around the inner wall of the dye and is rapidly cooled by cool water that is cooling that wall.
This process enables the production of thicker-walled pipes. Further processing of pipes made by each of the processes is possible and involves methods very similar if not identical to how the wire is made. This process could also be adapted for the production of clay pipes.