You use themselves to refer to people, animals, or things when the object of a verb or preposition refers to the same people or things as the subject of the verb.
They all seemed to be enjoying themselves.
他们看起来都玩得很愉快。
You use themselves to emphasize the people or things that you are referring to. Themselves is also sometimes used instead of 'them' as the object of a verb or preposition.
Many mentally ill people are themselves unhappy about the idea of community care.
许多精神病患者自己就不喜欢社区护理。
You use themselves instead of 'himself or herself' to refer back to the person who is the subject of the sentence without saying whether it is a man or a woman. Some people think this use is incorrect.
What can a patient with emphysema do to help themselves?
肺气肿病人能做些什么来自救?
You use themselves instead of 'himself or herself' to emphasize the person you are referring to without saying whether it is a man or a woman. Themselves is also sometimes used as the object of a verb or preposition. Some people think this use is incorrect.
Each student makes only one item themselves.
每个学生自己只做一项。