Q:

What is recommended way to create modular C applications? 

I read in Stack Overflow that including a C file into another C file is not a best practice.  I was wondering how can I then create modular applications in C.
I understood that all you are recommended to include are header files, which doesn't contain the code implementation itself but just the "function calls". 
How does the compiler know where to find the respective code? 
Does it automatically look to a .c file with same name as the .h file? 
Generally speaking, how can separate code within a C application? 

A:

Generally speaking inlcuding header files instead of complete c files is best practice yes.  Your compiler does not need to know where any other code is, just the prototypes of the functions used.  
The part of the process that needs to know where the other code is is the Linker, which is not the compiler, but included in complete solutions like gcc.  
When compiling in gcc for instance, you can add references for the linker, as specifically noted in the comments. 
Credit to @jovit.royeca for an example on linking with the compiler gcc:

Suppose you have a main file for your program called demo.c 
You are using some functions of the file bit.c in it.  What you then
  need to do is make a header called bit.h containing all global
  variables and function prototypes from bit.c and then include it into demo.c with #include "bit.h" and then link it in gcc
  like so:
gcc -o demo demo.c bit.c

Some complete solutions like eclipse for c/c++ automatically assume all c files in a project will be linked to the main one, for instance. 

A:

The recommended way is to create modules (.c files) with a specific functionality; compare it to a class.  To make this functionality available to other modules, you create a header file with the functions, data types and variables the module exposes (makes available). 
To create a program, you write or re-use the modules and call them from the main program (to call them, you should #include the header files). 
The makefile, or a "project" in an IDE tells your development environment/the compiler which modules/.c-files to compile and then the linker links them into an executable. 
Using modules as described alows you to hide their implementation (complexity) from other .c-files,

