What is the function of a cell wall in a cell?

it protects the cell wall from any bacteria virus, and other enffections