From Tolkien Gateway
"Long-worms" was another name that J.R.R. Tolkien used for, at least, some dragons. The only named example is Scatha:
Frumgar, they say, was the name of the chieftain who led his people to Éothéod. Of his son, Fram, they tell that he slew Scatha, the great dragon of Ered Mithrin, and the land had peace from the long-worms afterwards. Thus Fram won great wealth, but was at feud with the Dwarves, who claimed the hoard of Scatha.
—J.R.R. Tolkien, The Lord of the Rings, Appendix A, "The House of Eorl"
Tolkien regularly used "worm" as a nickname for dragons - examples include Glaurung and Smaug - but it is unclear how "long-worms" differ, if at all.