This is perhaps may favourite question so far. There IS an evolutionary relationship between humans and all animals including worms because we all have a common evolutionary root way back in time. Imagine the evolution of all animals (not plants or fungi or bacteria though) as a big bush with one trunk quickly branching off into about 35 smaller branches (that’s how many main body ‘blueprints’ there are in animals) now imagine all these branches branching into loads and loads and loads of smaller branches. Each branch may become more and more distantly related from another branch but they will share that common root. That’s what it’s like for humans and worms! Our branch has branched off from a primate and we’re closest to the other Great Ape branches. All the worm branches are a bit further away.
When one worm genome was analysed it was found, for that group at least, that worm genes have more in common with vertebrate genes than they do with insect or nematode genes! (nematodes aren’t exactly worms but they look like them though their a lot smaller). When I say our genes have a lot in common I mean that we may share the same genes or that the various proteins in our genes fit together in similar ways. It’s very complex! It doesn’t mean that worms branched off from primates though! It simply means that as you go further and further back in time and closer to the main trunk of our Bush of Life (we usually call it the Tree of Life but I bet it would look more like a bush) there would have been organisms from which branches led off eventually towards worms and eventually towards us primates, retaining those early genes from that ancient common ancestor.