The #include directive is used to include header files in C, which contain declarations for functions and macros that are used in the program. It helps the compiler understand the interfaces of functions used in the program.