Sorry but I don't often look in this forum... the larval forms of many insects make "homes" out of whatever debris they find in their environment... and that is what we're looking at here. Exactly what insect I can't say because you don't offer many details about where it was found... with all the small grains of sand I see I'd be inclined to guess a caddisfly larvae but they are usually aquatic.

Gerry