There are two types of computer programming errors ...
Compile-Time
One type is a compile time error. If there is a syntax error in the code, the compiler will detect the error and the program won't even compile. At this point, the programmer is unable to form an executable that a user can run until the error is fixed. Forgetting a semi-colon at the end of a statement, for example, is a compile-time error. It's something the compiler can detect as an error.
Run-Time
The second type is a run-time error. Compilers aren't perfect and so can't catch all errors at compile time. This is especially true for logic errors such as infinite loops. For example, the actual syntax of the code looks okay. But when you follow the code's logic, the same piece of code keeps executing over and over again infinitely so that it loops. In such a case, compilers aren't really smart enough to catch all of these types of errors at compile-time. Therefore, the program compiles fine into an executable file. However, and unfortunately, when the end-user runs the program, the program (or even their whole computer) freezes up due to an infinite loop. Other types of run-time errors are when an incorrect value is computed, the wrong thing happens, etc. Basically, a run-time error is anything that goes wrong in a program. It's any error or problem with the program that slipped by the compiler's error checker.