The structural difference - a membrane is made of a phospholipid bilayer - small phospholipid molecules in two layers facing opposite directions. Protein tubes, meant for facilitated diffusion, occur along the membrane as well. The membrane is flexible. The cell wall is a rigid wall of carbohydrates. Cell membranes occur in plant and animal cells (although I'm not absolutely sure about prokaryotes, only eukaryotes) while walls are only in plant cells (again, i'm not absolutely sure about prokaryotes).
The functional difference - the membrane is for holding the cell together and somewhat for shaping it, but it's more so for controlling which substances will enter and exit the cell and which ones will not. This is what the gaps between the phospholipid molecules and the special protein tubes are for. The cell wall is to maintain rigid shape and hold the cell together.
Linkback:
https://tubagbohol.mikeligalig.com/index.php?topic=36295.0