The sentence is a reported question. The original question was likely "When did you study English?" and "When was it yesterday evening?". We need to form a reported question in the past tense.
Your friend asked you, "When did you study English? When was it yesterday evening?"