We study the origin of tail-like structures recently detected around the disk of SU Aurigae and several FU~Orionis-type stars. Dynamic protostellar disks featuring ejections of gaseous clumps and quiescent protoplanetary disks experiencing a close encounter with an intruder star were modeled using the numerical hydrodynamics code FEOSAD. Both the gas and dust dynamics were taken into account, including dust growth and mutual friction between the gas and dust components. Only plane-of-the-disk encounters were considered. Ejected clumps produce a unique type of tail that is characterized by a bow-shock shape. Such tails originate from the supersonic motion of ejected clumps through the dense envelope that often surrounds young gravitationally unstable protostellar disks. The ejected clumps either sit at the head of the tail-like structure or disperse if their mass is insufficient to withstand the head wind of the envelope. On the other hand, close encounters with quiescent protoplanetary disks produce three types of the tail-like structure; we define these as pre-collisional, post-collisional, and spiral tails. These tails can in principle be distinguished from one another by particular features of the gas and dust flow in and around them. We find that the brown-dwarf-mass intruders do not capture circumintruder disks during the encounter, while the subsolar-mass intruders can acquire appreciable circumintruder disks with elevated dust-to-gas ratios, which can ease their observational detection. However, this is true only for prograde collisions; the retrograde intruders fail to collect appreciable amounts of gas or dust from the disk of the target. The predicted mass of dust in the model tail-like structures is higher than what was inferred for similar structures in SU~Aur, FU~Ori, and Z~CMa, making their observational detection feasible. Abridged.