planaria or detritus worm, nothing to worry about unless you are breeding fish or have hundreds of worms in the water and on the glass. If there are lots in the water and on the glass, that's usually an indication there is a water quality problem or the gravel and filter need a clean.