By carefully managing the end of your filament and setting up your spool correctly, you should not encounter tangling of your filament on the spool. But you can sometimes end up with the filament end under one or more downstream coils of filament. When that happens, the line crossing (aka the knot) can sometimes walk down the spool for quite some time before getting wedged and jam.
Over the years I've heard a bunch of people claim that these knots come from poor winding during manufacturing* - but that's mathematically impossible for knots to be placed inside the spool as the filament is wound continuously on to the spool. The only way a knot can happen at the factory is if the end of the filament get tucked under downstream coils after the spool is removed from the winder, but before the end is secured.
Whenever you get a fresh spool of filament, make sure that there is not a line-crossing in that first couple turns of filament. You'll be fine after that!
* In a couple of rare cases, we've had spools where the winding was too tight -- instead of a knot, the coil was pulled inward on the spool leading to a "wedgie". Should that happen to you, be sure to ask your vendor for a replacement.