A buffer overflow happens when a software program stores too much information in reserved block of memory. Typically a program will overwrite other memory blocks, resulting in a crash, errors, or even make the software vulnerable to security problems.
Most buffer overflow attacks abuse this type of weakness to overwrite parts of the memory and store code of the attacker. By using memory jumps, the attacker tries to get the code to be executed. This may result in leaking data, create shell access, or simply crashing the system.