The worms you are seeing are tapeworms segments. Cats get them from eating rodents and/or ingesting fleas. The best way to prevent them is to treat your cat and all other in contact pets with monthly flea preventative, and to make sure she does not eat rodents. They are easily treated with oral dewormers. Just make sure the dewormer targets tapeworms, as most OTC dewormers are only effective against roundworms. There is always a chance people can contract tapeworms, but they must ingest them. Therefore, it is only a real concern in young children who frequently put their hands in their mouths.