The Header (.h) file describes the interface to the code, because that's the only bit that other code gets to see.
The Source (.cpp) file provides the implementation of the code that nobody else needs to know about.
you include .h file which doesn't include .cpp ...
Correct.
As a consumer of this code, you only need the Header file so that the compiler knows what's available in that code for you to work with. The C++ source code is not used in any way, shape or form at this point (or, at least, it shouldn't be).
... but .cpp are somehow compiled too.
Yes that are, but completely separately.
The .cpp file of a module/library that you are using is compiled into an Object file (.o / .dll) by the Developer of that library. That object file will contain entry points that are the same "shape" as those described in the Header file.
You will need that Object file when you come to link your finished executable, at which point the Linker may grab the contents of the Object file and embed it into your executable (that's for static linking; dynamic linking gets more complicated)
Basically the linker has to "joins the dots" between the entry points that your code expects to be able to call, based on what it saw in the Header file, and what's actually in the library itself).