"There were 10 people who went to the store."
"There were 10 people who had brown hair"
- There were 10 people who went to the store.
- There were 10 people who had brown hair.
WhoWho refers to people. ThatThat and whichwhich refer to groups or things. (grammarbook)