A correct way to use wollen
is
Ich will schlafen
where wollen
is used as a verb and schlafen
as an adverb.
We can also have
Ich habe ... wollen
where wollen
is now used as a second part of the verb (weak verb is called?).
I don't really understand why it can be used in two similar sentences (I want to sleep / I want to have) but occupy different roles in the sentence. I'd expected the second example to be Ich will haben
or the first example to be Ich schlafe wollen
. Well, to be the same.
What is the rule in German defining this kind of usage? I want to be able to read about it and better understand rather than trying multiple ways of making sentences until I find one, by mistake, that is correct.