At one time (before the 1950's), all programs were written in machine language. But people quickly discovered that it was hard to write correct, properly-working programs in machine language. (We won't go into the specific reasons here.) So computer scientists invented other programming languages-such as C-to make it easier to write programs.
Today, almost all programs are written in some kind of programming language that is translated into machine language by a compiler.