Which cellular structure found in both prokaryotes and eukaryotes is primarily responsible for separating the inside of the cell from the outside?