A compiler is simply a program that takes a bunch of code, and turns it into a form that a computer can execute.
They are useful because they let programmers write code that is more human-readable and understandable, and then convert it to computer-speak.
They also can make the code really efficient by doing things like getting rid of unused files, or other substitution optimizations.