What causes waves in the ocean?

There are many types of waves flowing across the oceans, from small ripples to huge walls of water, 30 metres high peak-to-trough, but how do they form?

What causes waves in the ocean?

Photo: ic-cdn.flipboard.com