In direct speech, we write the exact words that a person says and put speech marks around them.
"I'm hungry!" said Peter.
Reported speech tells the reader what the person said, but without using the exact words and without speech marks.
Peter said that he was hungry.
The word that can be missed out.
Peter said he was hungry.
As well as removing the speech marks, we need to change the word I to he and put the sentence into the past tense. Exclamation marks and question marks are also left out of reported speech.
If the direct speech is a question, then the word order also needs to be changed when converting it to reported speech.
"What time is Jack coming home?" asked Carla.
In reported speech this becomes:
Carla asked what time Jack was coming home. (Not: Carla asked what time was Jack coming home.)