Behavior in organisms is based on an outside stimulus. Woodlice have simple behavior patterns, seeking out dark and damp areas when possible.
Humans are more complicated, but our behavior can be based on simple stimuli as well. If we encounter something that causes pain, we avoid it in the fututre. We would often move to a warmer place on freezing cold days.
Example: Hitting just below the knee on the tendon.
Action: the leg kicks out slightly.
Receptor: Nerves and tendon in the knee.
Effector: Quadriceps react.
Another example would be a pupil changing size when the surroundings change from light to dark, or dark to light. The muscle in the eye is reacted when this change happens and adjusts the pupil to focus. The reaction can help survival by adjusting to the dark; for humans its useful to be able to see in the dark so we can see where we're going; for animals it helps them hunt and find shelter.