e.g. Tell me what you want.
1. Tell me. + What do you want?
2. Tell me the thing. + You want the thing.
(What is the part of speech of 'what'? Does 'what' come from #1 or #2?)
'what' can be either an interrogative pronoun or a relative pronoun. Here, it's the first one.
I should explain more.
The word 'what' is introducing an indirect question in this sentence; therefore it is an interrogative pronoun.