Homeostasis is the maintenance of constant conditions necessary for growth and development. In case of cells, cell membrane helps the cell maintain internal environment and controls the entry and exit of molecules, in such a way that the cell has the best possible chances of survival, maintenance and growth. Cell membrane is a phospholipid bilayer. It is made up of amphiphilic molecules, that is molecules that contain both a hydrophobic end and a hydrophilic end. In the cell membrane, all the hydrophilic molecules point outwards (out in to the environment or in towards the cell interior), while the hydrophobic heads point to each other. This configuration allows the cell membrane to be selectively permeable, that is, it only allows the entry of certain specific molecules, while restricting every other molecule. This ensures that any molecule which could be harmful to cell is not permitted entry.
Hope this helps.