What happens when you type gcc main.c?

GCC is a compiler integrated for C and C++ and others programming languages, generate a binary executable program in the language of the machine where it is to run.
The acronym GCC stands for “GNU Compiler Collection”. and the Syntax is:
gcc [ option| file] …
Examples:
gcc hello.c: Compile the program in C hello.c, generate an executable file a.out.
gcc -o hello hello.c: compile the program in C hello.c, generate an executable file hello.
gcc -c hello.c:
it does not generate the executable, but the object code, in the file hello.o. If it does not indicate a name for the object file, use the name of the file in C and change the extension to .o.
gcc -c -o object.o hello.c:
generates the object code indicating the file name.
For more additional information use man gcc in Linux terminal.