Assuming that the forced oscillation dominates the free oscillation, when the particular solution $x=A\sin(\omega t)$ is substituted into the equation of motion
$$m\ddot x+kx=F(t)=F_0\sin(\omega t),$$
we see that the relative magnitude of the two terms on the left are $m\omega^2:k=\omega^2:\omega_0^2$. If $\omega<\omega_0$, then $kx$ has the same sign as $F(t)$; that is, the displacement and the forcing has the same direction. On the other hand, if $\omega>\omega_0$, then $m\ddot x$ has the same sign as $F(t)$, so $kx$ and $F(t)$ have opposite signs; that is, the displacement and the forcing has the opposite directions.