"She has written three letters for her friend."
He said that she had written three letters for her friend.
"My friend gave me a bar of chocolate."
She said that her friend had given her a bar of chocolate.
Direct speech.
Indirect speech.
Reported speech.