Different activities in the city go on in different buildings or places. For example, energy generation in power stations, manufacturing in factories, and planning and administration in City Hall.
The cell too has its own specialised areas. Just as in a city you would not want a restaurant in the same building as a sewage works, so in the cell different functions are separated into different compartments. All these compartments can then co-exist quite happily within the outer boundary of the cell. The walls of these internal compartments or "buildings" are made up of the same material as the outer membrane.
One of the best ways to look at the internal compartments of a cell is to use an electron microscope.