It's time to revise "Reported speech". The basic idea is that you use 'Reported Speech' (or estilo indirecto in Spanish) for telling what other people told.
Here is a video you should watch because it offers many examples of tense shift.
You could practise the reported speech with the following exercises.
- Mixed Tense Reported Statement Exercise
- Present Simple Reported Yes/No Question Exercise
- Present Simple Reported Wh Question Exercise
- Mixed Tense Reported Question Exercise
- Reported Requests and Orders Exercise
- Reported Speech Mixed Exercise 1 (difficult)
- Reported Speech Mixed Exercise 2 (difficult)
Here's a bunch of exercises to practise reporting verbs.