Chickens get many types of worms, and some of these have a direct life cycle (i.e they get infected from other chickens) and some have an indirect life cycle (they get infected by eating a required intermediate host, like a beetle or a worm). Some can be transmitted either way, such as large roundworms, which can be transmitted by a host of bugs and earthworms, snails or slugs, which they use as a "transporter" host (the proper term is "paratenic host", meaning they are not required for transmission), or worm eggs can be passed from chicken to chicken directly. They aren't transmitted as actual worms, they move around between hosts as eggs, as do most internal parasites. Some worms even live outside the host some of the time, but I don't know if there are any of these that infect chickens.
Tapeworms are transmitted only by intermediate hosts like ants and beetles, and cannot be directly transmitted from chicken to chicken.