The boundary of the cell is a barrier made of phospholipids.
Phospholipids are molecules made of three parts:
A "head" that is hydrophilic, this means it can be in touch with water.
Two "feets" that are hydrophobic, this means they repel water.
The way those phospholipids disposed of is on a bilayer, heads to the outside and feet to the middle.
That disposition helps the barrier to filter what can and can't get in and out to the cell.