1used to show that the people who do something are affected by their own action:
Teachers have no choice but to take measures to protect themselves.
Our neighbours have just bought themselves a jacuzzi.
The kids seem very pleased with themselves.
2used to emphasize the pronoun 'they', a plural noun etc:
Doctors themselves are the first to admit the treatment has side effects.
3used after words like 'everyone', 'anyone', 'no one' etc when you talk about someone already mentioned and you do not know what sex they are or it is not important. Many teachers think this is not correct English:
Someone told me they'd actually seen the accident happen themselves.