IL-Intermediate Language Code
It is nothing but a partially compiled code or half compiled code.
Higher-level language(human known) is compiled lower-level language(machine known). So need a compiler.
Look at c,c++ is directly compile and when it compiles that time the source code will be configured for the machine in which it is located. This is called a full compilation.
one drawback of full compilation, the source code is optimal for that only developer system but on an end-user system, this code is not run in optimal because of its lower configuration.
What is half compilation?
When higher-level language is compiled that time not checking environment like Operating system, which processor 64 /32 bit.only syntax checking. This called half compilation.
What is the IL code?
Microsoft visual studio supports too many languages. In some different users have different machine configurations and different operating systems unknown to visual studios. That is the main problem. To avoid this problem Microsoft Creates a code that is called as IL Code.
Why is Il half compiled and not full compiled?
during runtime, the compiler figures out what is Operating System, hardware Configuration and compile an optimal code as per that environment.

Who compiles the Il code to machine language.
When Il code is executing on an end-user machine then .Net think was JIT and according to their compile Il code into machine language.
JIT(Just In Time)
JIT is not all compilation. Because jit unknown something, where it run and where it changes so it run at last movement and just in time.
How
per file-Complete C# file and compile it machine language
per method- Take some method or function only that compile and send that compile code in memory.
code fragment-It takes only 3 or 4 lines and compile into machine language.
As a new learner to c# recommending to see below project series: -






