A buffer overflow is when a program tries to store an excess amount of data to a buffer than it can hold, as there is a limit on how much data a buffer can hold, the surplus data overflows to the adjoining buffers. Thus, overwriting the data stored in those buffers, and triggering unpredictable consequences.