Worms in the soil of houseplants are not common. If they are Earth Worms they will help the plant out, so if you can tolerate them leave them alone. If they are larvae, you may need to try and get rid of them. Removing larvae from soil could be tricky. You could scoop out the loose upper layers of soil and replace it with fresh. A very light solution of dish soap and water can be watered in, this will not have a negative effect on the plant and can help the plant absorb water more effectively. A systemic pesticide could also be used, but I would only recommend that as a last resort.