Cotton was domesticated from wild ancestors
Like all modern crops, the cotton plants that grow on farms today are descended from species that lived in the wild. And these species still live in the wild today. These wild cousins are not all that different from domesticated cotton. They grow in warm, dry places. And they make a big poufy seed pods, filled with seeds covered in long, silky fibers.
Thousands of years ago, ancient people started using the fibers from these wild cotton plants. They spun them into ropes or yarn and wove them into fabric. Eventually, they began farming cotton. As early farmers did with many types of crops, they took advantage of natural variations. They noticed that some plants were more useful than others. Maybe their fibers were longer or stronger, which made a better yarn. Or maybe some made bigger seed pods with more fibers. The farmers knew that traits passed through seeds from parent to offspring. So they collected seeds from the best plants and used them for the next year's crop. Through selective breeding, they gradually developed a domesticated form that was even more useful.

Domesticated cotton has more plentiful and longer fibers that are more easily removed from the seed than wild varieties. (Shown are domesticated upland cotton, cult. AD1, and its closest wild relative. Images courtesy Jonathan Wendel, used with permission.)