Buffer overflow can cause the program to crash or leak private information. A buffer in case of a running program, can be considered as a section in a computer's main memory with specific boundaries, so basically accessing any buffer outside this allocated region of memory space.
As the variables are stored together in stack/heap, accessing anything outside this boundary may cause read/write of some bytes of some other variables. But with a better understanding we can execute some attacks.