Thousands of years ago our ancestors learned to weave yarn into cloth. Knitting is much newer. But it is not new. It is several hundred years old. In weaving there are up-and-down threads and cross threads. Knitting can be done with a single thread.
In knitting, yarn is looped through loops. Knitted materials are looser and more stretchy than woven materials. But they do not keep their shape as well.
The first knitting we know about was done by fishermen's wives in Scotland. They knitted caps for their husbands. Of course, they did their knitting by hand. The finest knitted suits and sweaters and baby clothes are still knitted by hand. They are knitted on knitting needles. But most knitting is now done by machine.
The knitting machine was invented in England in the days of Queen Elizabeth I. The inventor was William Lee. One story is that he invented the machine because the girl he loved spent too much time knitting instead of talking to him. Lee gave the Queen a pair of silk stockings he had knitted on his machine. She was pleased, but she would not give Lee a patent on the machine. She was afraid it would throw many knitters out of work.
Knitting machines can knit yarn of many kinds. Wool, silk, rayon, and nylon are the yarns most used. All hosiery is knitted. Hosiery is knitted in the shape it is to be. So are many suits and sweaters. But yard goods also can be knitted and then cut and sewed into clothing. Tricot and jersey are both knitted materials.