If you can imagine how spaghetti is made, molten plastic is squeezed through a shaped orifice, typically a custom made and designed steel die in the shape of the cross section of the intended final product. The extrusion process produces a continuous work piece; refer to the diagram below.

Molten thermoplastic beads, granules, or flakes are placed in the hopper and fed into the heating barrel via gravity. A reciprocating screw melts, mixes, and moves the molten plastic forward and is pushed through the steel die where the shaped plastic is cooled.