A NullPointerException is a runtime exception in Java that occurs when an application attempts to use an object reference that has not been initialized, meaning it points to null. This typically happens when calling a method on a null object, accessing or modifying a field of a null object, or taking the length of a null array, leading to program crashes if not properly handled.