A transitive dependency is a library that your library depends on. You never chose it, but it ships in your application anyway. Most vulnerable packages in a typical project are of this kind.
How it happens
You add package A. A needs B, and B needs C. A is a direct dependency; B and C are transitive. A modern web project can have a handful of direct dependencies and hundreds of transitive ones. A flaw in C is your flaw too.
Why they are hard to fix
You cannot edit C in your dependency file because you did not list it. The usual order is: upgrade A, which may bring a fixed C. If A has not updated, force the version of C with an override, then remove the override later. Steps are in how to fix a vulnerable dependency.