According to Wikipedia - Hubble's law (version of April 2019)
Objects observed in deep space — extragalactic space,
10 megaparsecs (Mpc) or more — are found to have a redshift,
interpreted as a relative velocity away from Earth;
all the galaxies move away from each other.
The law is often expressed by the equation $v = H_0 D$,
with $H_0$ the constant of proportionality — Hubble constant —
between the "proper distance" $D$ to a galaxy [...]
and its velocity $v$ [...].
The Hubble constant is about $70 \text{ (km/s)/Mpc}$.
This law is an average law, applicable to the large distances only
($D \geq 10 \text{ Mpc}$, see above), and thus for large velocities
($v \geq H_0 \cdot 10 \text{ Mpc} = 700 \text{ km/s}$).
It totally neglects the chaotic individual movement of galaxies
relative to their neighbor galaxies nearby.
Therefore Hubble's law is not applicable to the Andromeda galaxy
which is only $0.78 \text{ Mpc}$ away from the Milky Way (our galaxy).
Due to the individual movement of these
galaxies within the Local Group of galaxies
the Andromeda galaxy happens to approach us with a velocity
of $300 \text{ km/s}$.
This is still a small velocity compared to the velocities
where Hubble's law is applicable.