To say when in spanish you can use the word cuando which can be in a question and also in an answer.
Let’s see an example:
Cuando te vas? which means when do you leave?
Me iré cuando acabe mi trabajo. I will leave when I finish my word
If you find it useful please share the article. Thanks in advance.