The best analogy of the cell's plasma membrane to parts of a house would be the outside walls. The cell membrane consists of a phospholipid bilayer that encapsulates the entire cell and holds all of the contents together inside. It also prevents unwanted materials from entering the cell. The exterior walls of a house do the same thing. They hold and protect the contents inside the house and keep unwanted materials from entering (pests, cold air, moisture, etc.). But desired objects (people and controlled amount of fresh air) can enter through openings in the exterior walls like doors and windows.
the walls act as a barrier to outside the house. Doors and windows are openings that allow substances to pass in and out.