Runtime refers to the time a program runs on a computer or device. During runtime, the computer's CPU executes the commands in the program's machine code. It starts when you first open a program and the operating system loads it into RAM, along with any extra libraries or external frameworks the program calls for. The runtime ends when you close or quit the program, and the memory allocated to it becomes available for other programs.
In a software development context, the word "runtime" also refers to the environment a software developer designs a program to run within. The runtime environment consists of the operating system and linked code libraries. For example, programs that run in Windows make calls to dynamically linked library files (DLLs) to execute various standard functions. The runtime environment may also include virtual machines or interpreter programs necessary for the program to run.
A runtime error is an error, or bug, that happens while the program is running. The term differentiates these errors from errors that occur while the program is compiling, like syntax errors and other compilation errors.