I couldn't identify which species these worms belong to. I believe they're insect larvae. They measure approximately 5 to 10 mm in length, and are common in the southern states of India. They carry cocoons, open at both ends, which the worms can wriggle inside and alternate their direction of movement. These cocoons are perfectly smooth except for the openings. Another post shows something similar, but the cocoon of that worm looks more woven, while this one doesn't.
This is definitely the larvae of one of a many number of case-bearing moth species. As noted in comments and elsewhere, these case-bearing moths show up fairly frequently on Bio.SE (e.g., see here, here, here, here and here for some examples).
Some of these species even build cases that they carry around with them.
Your specific example is possibly Tinea pellionella (case-bearing clothes moth).
T. pellionella has a cosmopolitan distribution and occurs nearly worldwide (Cheema 1956). As the Wikipedia article summarizes, the larva feeds mainly on fibrous keratin (e.g., hair and feathers) as well as carpets, furs, upholstery, and woolen fabrics. The larvae remain inside a case it constructs from debris such as hairs and fibers (e.g., from clothing, upholstery, carpets, etc.).