Themselves is a reflexive pronoun, being a reflexive form of they. It can be used especially in the following ways:
as an object that refers to the same people that are the subject of the sentence or that are mentioned somewhere earlier in the sentence: They prepared themselves for the struggle ahead. ♦ We ask people questions about themselves.
after a plural noun or the pronoun ‘they’ for emphasis: It is the party leaders themselves who make the decisions.