Andrew: I'm not sure where to go on holiday this year.
Bill: Have you ever been to Florence?
Because it is important now whether Andrew has been to Florence at some time in the past, he uses a present perfect.
Andrew: Yes, I have been to Florence?
Bill: When did you go?
Because Bill wants to know about a particular time in the past, he uses a past tense in his question, especially as Andrew will reply with a date in the past and therefore cannot use a present perfect.
Carol: er .. There's a problem with the car, mum.
Mum: Oh no! What have you done?
Because Carol's mum thinks something her daught did in the past has caused a problem in the present, she uses the present perfect.
Carol: er .. There was a problem with the car, mum.
Mum: Oh no! What were you doing?
Because Carol has described the problem in the past tense, her mum wants to know what her daughter did to cause the problem, so she uses past continuous to ask what Carol was doing at the time that the problem occurred.
David: How do you do that?
Mitch: Haven't you ever done it before?
Mitch is using the present perfect, because if Davide has not done it in the past, Mitch will show him how to do it now (in the present)
Tony: Where did you get that sofa?
Jill: I've been looking at some catalogues.
Because Jill already has the sofa, she puts her answer about how she found it into the past tense.
Tony: So you are thinking of buying a house?
Jill: Yes, I've been looking at some possibilities.
Jill is still looking so she uses a present perfect continuous to describe a recent activity. (Because she is still looking, she could also have used a present continuous - 'I am looking')
Tony: So you are thinking of buying a house?
Jill: Yes, I was looking at some at some around here, but they're too expensive.
Becuase Jill has decided the houses 'around here' are too expensive she has stopped looking, and so uses a past continuous for an action she did for some time inthe past, but is no longer doing. (She could also have used a past tense - 'I looked')
Sergeant Jones: When did you finish?
Private Smith: When I hit the tank.
Smith has finished, so the action that caused him to finish should be put into the past tense.
Sergeant Jones: When do you finish?
Private Smith: When I've hit the tank.
This is more advanced! This is the result clause in a future tense conditional. Private Smith is saying 'I will finish when I have hit the tank.' (If that seemed easy, you should try the advanced exercises.)