When the light from the Sun reflects off the surface of the solar sail, the energy and momentum of light particles known as "photons" is transferred to the sail. This gives the sail a "push" that accelerates it through space. Although the accelleration is very slight, it is also continuous, enabling the sail to reach very high speeds in a relatively short time. The diretion of the push is controlled by the angle of the sail with respect to the Sun, adding to or subtracting from the orbital velocity.

Does a solar sail fly on the solar wind?

No! The solar wind is made up of ionized particles ejected by the Sun. These particles move much slower than light. A solar sail does not stop or reflect them, although they also may impart some of their momentum to the solar sail. However, the force from the solar wind is less than one percent of that from light pressure.