There are a few ways to harness the power of waves that engineers have come up with, three of the main ones are as follows; a terminator, an attenuator and a point absorber.
A terminator is always facing perpendicular to the motion of the waves and is made up of a stationary part and a part that moves with the waves. The stationary part can be fixed to the bottom of the ocean far out or right off shore. An example of a terminator is an oscillating water column, showed at left. One opening at the bottom allows water to come in the column with the waves, and another narrow opening at the top allows air in and out. As the waves fill the column they force the air out the opening, where it turns a turbine. As the water falls back down it pulls air through the top and pushes the turbine again. This process creates electricity.
The second type of wave energy converter is called an attenuator. These devices are oriented parallel to the motion of the waves. These consist of long cylindrical tubes connected by hinges and attached to the sea floor. When the tubes move up and down they turn a turbine in the connections, creating electricity that travels to the sea floor and to shore through the cables.
There's also a machine called a point absorber. They can be placed anywhere in the ocean. When water enters and exits the vertical tube, it pushes a piston, which drives a turbine and generator. This creates electricity, which is carried to shore through a cable.