The cell membrane surrounds every living cell and delimits the cell from the surrounding environment. It serves as a barrier to keep the contents of the cell in and unwanted substances out. It also functions as a gate to both actively and passively move molecules, such as essential nutrients, into the cell and to remove waste products.