Definition of yarn

What does the word yarn mean?