Cell membranes use both passive and active transport to regulate what passes in and out. Passive transport relies on diffusion and osmosis to move molecules down concentration gradients, while active transport requires ATP and uses carrier proteins to move molecules against gradients. Membranes are selectively permeable due to these transport mechanisms, which maintain homeostasis and allow for important cellular functions.