16 pieces of yarn is required until the loom is filled (or 24 strings from spiders). Each strand will add a visible portion of cloth on the loom until it is completely filled. When the loom is prepared, shift-right click with empty hands on the loom. This will weave the strands until a cloth is produced.
Crafting the loom requires 7 lumber arranged in an upside-down U, with a stick in the center. The loom must then be placed on the floor, and each strand is added by holding it in the hand and right-clicking the loom.