Osmosis:
The purpose of osmosis is to move water across a membrane. Clam cells do this to maintain a water level that they are comfortable with, just like humans.
Diffusion:
In diffusion the concentration gradient moves from high to low. In a clam the higher concentrated oxygen moves from the inside to the outside of the cell membrane and the lower concentrated carbon dioxide moves from the outside to the inside of the cell membrane to replace the oxygen. The same thing happens when the concentrations are different and the directions of the oxygen and the carbon dioxide are opposite. That means that the lower concentrated oxygen moves from the outside to the inside of cell membrane and the higher concentrated carbon dioxide moves from the inside to the outside of the cell membrane.
Active Transport Picture: