When you report a question that someone asked, that someone knows the answer to, or is aware of (that is, a question after a verb of speaking, asking, telling, knowing, sensing), the verb is changed to the appropriate tense of the subjunctive according to the rules of sequence. This means that after a primary tense, the subjunctive must be either a present subjunctive (representing an original present or future) or a perfect subjunctive (representing an original past); after a secondary tense, the subjunctive must be either a imperfect subjunctive (representing an original present or future) or a pluperfect subjunctive (representing an original past). Note: the present or imperfect subjunctive of the future periphrastic can always make it clear that the original verb was a future, if there is any ambiguity.
The biggest problem with the indirect question is to recognize them after verbs that are not verbs of questioning. For instance, "I know what you are doing" contains an indirect question "what you are doing") just as clearly as the analogous sentence, "I ask what you are doing." Similarly, "He told me what you are doing." is just like "He ased me what you are doing." Both are indirect questions.