if a molecule is too large it cannot pass. also it depends on the concentration of a specific substance inside the cell. similarly, if a molecule is polar it cannot penetrate the phospholipid bilayer.
there are proteins that work as channels and pumps that allow these molecules to pass