Ocean waves are caused by the wind as it blows across the sea and by tidal changes due the the gravity of the moon pulling on the earth. Waves are a great source of energy and effectively inexhastable. Extracting energy from the waves is the hard part, that is why there is not many wave power statons in the world.
Currently the most effective method is to use the waves to move a body of air in and out of a chamber. The wave arrives at the chamber causing the water within it to rise. This mean the air in the chamber is forced out a hole in the top. When the wave leaves the water level drops again, drawing air back into the chamber and the process repeats.
If you place a turbine at the hole you generate power. Or better yet one air in hole and one air out hole driving the turbine. The major problem is the noise of this rushing air is quite loud. The chamber must also be held still realative to the wave and this involves either attaching it to land, the ocean floor or a larger structure and this can be tough with the rough conditions at sea.
If you'd like to look at a sample one in action, have a look at Wavegen.
Also in development are using a series of floating tubes that use the position of one relative to another to pump liquid through turbines.