An exception is an event that disrupts the normal flow of your program. When Java encounters a problem it cannot handle, it creates an exception object and hands it off to the runtime system. This process is called throwing an exception.
If no code catches the exception, Java prints an error message and terminates. You have probably seen this already. Dividing by zero, calling a method on null, or accessing an array index that does not exist all produce exceptions.
The error output you see in the console is called a stack trace. It tells you the exception type, a message describing what went wrong, and the exact chain of method calls that led to the problem.