Your cat has fleas. The black specks are called 'flea dirt' and are flea excrement from blood that the fleas dine on.
The black worms are flea larvae, black from eating the flea dirt. The flea lays eggs on the cat, which fall off and hatch into larvae. This happens most wherever the cat spends time.
Frontline, or Advantrix are the two best choices for flea control on the animal, and environment, if you don't have an overwhelming problem which you probably do. You need to physically vacuum all the floors, furniture where the cat goes, in fact everywhere the cat goes, or can get when you're not looking. This will help get all the larvae and eggs and newly hatched fleas that you haven't seen yet.
Here is a link discussing more than you ever wanted to know about fleas.
It should help with getting the home back in your control.
After all this, you should have the cat treated for tape worms. They aren't normally any problem for the cat, but aren't any help either. Fleas transport them when the cat catches and swallows one.
I hope this is helpful, and best wishes.