Specifically in theme php files, such as say index.php. The very first thing in most theme's index.php file is a call to get_header() which is most certainly not not defined in index.php, so how does it know about that function?
I'm not very familiar with php, but from what I've read just now there is an include and require keyword which work more or less the same way as an import in Java or include in C, which I understand and makes sense. However, the only usage of these keywords in this particular index.php file includes a file that doesn't contain a definition of get_header(), nor does it have any includes or requires of its own (though it does call some more functions it has no right to know about, much like index) so clearly that's now how it knows about this function.
Anyway, I was just hoping to remove some of the 'magic' from wordpress for myself. Thanks in advance!