The cell membrane functions as a selectively permeable barrier that allows some substances to pass through via diffusion, facilitated diffusion, or active transport processes. Diffusion allows for the passive movement of small molecules and ions according to their concentration gradients. Larger molecules and ions require membrane transport proteins like channel and carrier proteins to cross. The cell takes in nutrients and disposes of waste through endocytosis and exocytosis, respectively. Active transport requires energy to pump molecules against their gradients via proteins like the sodium-potassium pump.