Earth is more likely to pass through the tail of a comet than to collide with a comet head on.
After all, a tail can be millions of times larger than the nucleus.
Passing through a tail doesn’t have any great effect, beyond a good meteor shower, since comets’ tails are severely lacking in density.
In 1910, however, when Earth went through the tail of Halley’s comet, people spent good money on remedies for the expected consequent illnesses and disaster.
The depiction of comets in popular culture is firmly rooted in the Western tradition of seeing comets as harbingers of bad omens and doom.