something moves backward and forward or side to side
Her long hair went to and fro as she swung on the swing.
The swing moved to and fro as the children played joyfully in the park.
The pendulum swung to and fro with a rhythmic motion in the antique clock.
The trees swayed to and fro in the gentle breeze, creating a calming effect.
The mechanic inspected the faulty machinery, rocking it to and fro to identify the source of the problem.