You weren't listening, it is necessary.. the compiler only
links with libc, this is terminology you'll need to understand.
Let's take the prototype for printf for instance.. it's in stdio.h.
Code:
int printf(const char *format, ...);
From this, we know the printf() function exists in libc.. we know the arguments the function takes.. and now, so does the compiler.
This was a simple example, what you might want to do is read over the header files you're including.. it's most definitely beneficial to see what information they define.
I'm not going to explain '...' (variable arguments), but you'll learn all this eventually yourself.