Can you tell me, do they look more like grains of rice, or more like spaghetti?
How old is your cat?
Thank you for that information. These worms are almost certainly tapeworm segments. They are a common intestinal parasite in cats, and easily treated. You can get the medication, generic name praziquantel, from your vet (Droncit or Drontal), or online (non-prescription), brand name Tradewinds.
Tapeworms are transmitted through an intermediate host, either fleas or rodents or other small critters. So, please also check your cat for fleas. Fleas are best treated with Advantage, Revolution or Frontline. These products are safer than the pet store variety.
I hope this was helpful. Please feel free to ask any follow up questions you have. I would be happy to talk further with you.
Tradewinds is definitely available on line. Your local pet store may have it also. Call them to ask, and make sure the active ingredient is "praziquantel."
It's extremely unlikely that you could contract tapeworm from your cat. You would have to ingest the flea that is the intermediate host (that's how cats get it from fleas). I wouldn't worry about it. Regarding your other cat, if he or she is also exposed to fleas, or eats mice, then they will likely also have it. I would go ahead and treat both cats. It's a very safe treatment.
Cats that go outside and eat critters will periodically pick up tapeworms. Some owners just routinely deworm their outdoor going/ hunting cats every few months.
You can read more about cat parasites below: