  The hot and dense QCD matter produced in nuclear collisions at
ultrarelativistic energy is characterized by very intense electromagnetic
fields which attain their maximal strength in the early pre-equilibrium stage
and interplay with the strong vorticity induced in the plasma by the large
angular momentum of the colliding system. A promising observable keeping trace
of these phenomena is the directed flow of light hadrons and heavy mesons
produced in symmetric and asymmetric heavy-ion collisions as well as in
proton-induced reactions. In particular, the splitting of the directed flow
between particles with the same mass but opposite electric charge as a function
of rapidity and transverse momentum gives access to the electromagnetic
response of medium in all collision stages and in the different colliding
systems. The highest influence of electromagnetic fields is envisaged in the
pre-equilibrium stage of the collision and therefore a significant imprint is
left on the early-produced heavy quarks. The aim of this review is to discuss
the current developments towards the understanding of the generation and
relaxation time of the electromagnetic fields embedded in both large and small
systems and their impact on the charge-odd directed flow of light and heavy
particles, highlighting the experimental results and the different theoretical
approaches. Since it is possible to perform realistic simulations of
high-energy collisions that incorporate also the generated electromagnetic
fields and vorticity, the study of the directed flow can provide unique insight
into the early nonequilibrium phase and the ensuing QGP formation and transport
properties.
