How do sunscreens and lotions protect us?

Is there a difference between sun lotions and sunscreens?