When we tell someone what another person said, we can use Direct Speech ("I am hungry") or Reported Speech (He said he was hungry).
Think of Reported Speech as "backshifting." Because the speaking happened in the past, the verbs usually need to take one step back into the past to stay accurate.