Ocean waves are created by wind ( in unique instances, waves may also be created by earthquake, landslide, or other major disturbance, but that does not concern us here. ) The factors in the mechanics of wave creation are wind speed and duration, and fetch.
Fetch is the distance over which the wind acts on the water. The longer the fetch, the greater the wave-building action. Similarly, the greater the wind speed, the greater the wave-building action. Winds are named for the direction they blow from, not to. Therefore, a west wind blows out of the west, toward the east. Predicting wave heights based on wind conditions is even today extremely imprecise - the weather service still gets it wrong about half the time.
More: Wind, Waves & Weather ...