You take short fibers, and twist and splice them together to get longer fibers. And you repeat until you get the desired length, or thickness...

Lots of videos of how to make it on the Internets using nettle, or some other plant (flax is still used to make clothes today though through industry methods).