Near the Surface
Plants which live just under the waters surface actually photosynthesize in the same way as land plants, as there is still a suitable amount of sun light and carbon dioxide. Algae, for example, can grow easily in water, as it sits on the surface or just below allowing it to take advantage of the sun and air.
Coral Reefs
Although some coral reefs are close to the surface, some are too deep to use the sunlight. At these depths, some light wave lengths still penetrate, but the visible spectrum which is seen on the surface does not. This means there is some light energy. The coral reefs also deposited calcium carbonate, which contains some carbon which is absorbed by other plants.
Roots
Many aquatic plants have very long roots which reach the sea floor no matter where the actually plant leaves are. These collect nutrients from the sea bed and transport them to the leaves. This makes up for any lack of carbon dioxide in the sea water.
Leaves
Aquatic plants have developed special leaves to live underwater. These are much more efficient at collecting and processing carbon dioxide and sunlight than those on the surface.
Conclusions
Essentially there is little difference between photosynthesis on land and underwater. The majority of aquatic plants have leaves that float near the surface and so photosynthesize in the same way, or they have long roots to collect nutrients from the sea bed.