Why is this sentence correct - concerning tenses

I did my homework when I had watched TV.

Does this mean that person did her/his homework after watching the Tv?

It's not correct. It needs to be one of the following:

~ I did my homework after I had watched TV. [... although I think "had" makes it sound strange; I'd use simple past tense in the 2nd clause.]

~ I did my homework while I was watching TV.

... or you could use "when" instead of "while" in the 2nd sentence.

Yes, I would also use past continuous. One more question. Is it correct that we use Going to Future when we are more sure that something is going to happen and Simple Future when something is not so sure and things can change?

If this is correct why is this sentence correct:
The manager is arriving soon. I would rather say will arrive because maybe something happens and he doesn't come so soon.

First of all, the purpose of "had watched" is to make that event in the past PRIOR to the statement "I did my homework."

If you are not SURE he will arrive, how about saying "the manager MAY arrive..." Unfortunately the use of the Subjunctive for doubt is dying (if not dead) in American English!

Sra (aka Mme)

P.S. It is alive and well in both Spanish and French!

Ok to conclude: Is when in the first sentence synonym for after? If it is then I am clear about the past perfect

How would you as a native speaker (I guess :)) explain to me when to use Simple Future and when Going to future?

Sra is "right on"!! And yes, I think "may" would be a better auxiliary verb if you're not sure something will happen in the future.

No, "when" and "while" are closer to being synonyms for each other, but not "after."

The futures are usually used with the simplest construction possible. There are many example sentences here:
http://grammar.ccc.commnet.edu/grammar/future.htm

About that May-I agree with both of you. But this sentence about the manager is supposed to be filled with either will arrive soon or is arriving soon (I would fill it in with will arrive but the correct answer is is arriving soon (I accidentally involved going to future in this story)

Either "is arriving" or "will arrive" mean the same thing. I'd be more inclined to use "will arrive" because it comes across more straightforwardly. But either one is correct.

Thank you both :)