you use the present perfect:
* when something happened in the past and it’s not important when it happened
* when something started in the past and is still continuing
* when something happened in the past and you can still see the result
* when something has just happened or is about to happen
You use the past simple when something happened in the past at a specific time.
When the first word of a question is: WHEN