A handrail supports movement on stairs or ramps, while a guardrail prevents falls from elevated areas.