This is the case of a reflexive pronoun. This type of pronoun indicates an action that falls on the person who is carrying it out. In other words, it is done by the subject for himself: "The fish have fun."
Depending on the personal pronoun, a reflexive pronoun will correspond. Let's see :