How are plastic water bottles made?

There are two basic methods to making a plastic bottle. The first is something called "thermomolding," which heats the plastic sheets until they are soft and pliable. Then the sheets are formed around a shape using more heat and a pressurized mold. After releasing from the mold, the bottle cools very quickly and is ready to be filled.
The other method is called "blow molding" and works on the same principle as blowing up a balloon. First, a sheet of plastic is formed into a tube. The tube is placed inside the mold and injected with hot gas. The hot gas causes the tube to expand to take on the shape of the mold. Once the bottle is formed, the mold releases the bottle, which cools quickly and is ready for use.
In both methods, the screws on the neck of the bottle are formed as part of this process, because it is the most efficient way to acquire a uniform screw shape.

From recycling.