A segmentation fault (often shortened to segfault) is a crash that happens when a program tries to read or write memory it is not allowed to use, such as an address outside its own memory, memory that has already been freed, or a read-only area it tries to write to. The processor’s memory protection catches the bad access, and on Linux and other Unix-like systems the operating system sends the program the SIGSEGV signal, which the Linux signal manual describes as an “invalid memory reference.”
Unless the program handles that signal, the default action is to terminate the program and, if the system allows it, write a core dump that developers can inspect with a debugger. Segfaults are most common in languages like C and C++ that let code work with raw pointers; typical causes include dereferencing a null or uninitialized pointer, running past the end of an array, and stack overflow from runaway recursion. On Windows, the equivalent error is usually reported as an access violation.
Source: Linux manual page signal(7), man7.org
Image: Card reader segfault by secretlondon123, CC BY-SA 2.0, via Wikimedia Commons.