They are both sorrounding the cell. they provide structure, filter, protection, etc. The cell wall is not in all the cells, nevertheless, those that have it have better protection. The cell membrane, also servers to provide structure, certain protection; serving more as a filter. The strongest cells are those that have both: a cell membrane and a cell wall.
Cell membrane is the living outermost component of cell. It helps in protecting cell from mechanical shocks and also provide a confined shape and structure to the cell. The main role of cell membrane is either to check the in and out movement of compounds to the cell, as it work as semipermeable membrane which allows the specific compounds or elements into and out of the cell.