I have heard about a buffer overflow and I would like to know how to cause one.
Can someone show me a small buffer overflow example? New(And what they are used for?)
In this context, a buffer is a portion of memory set aside for a particular purpose, and a buffer overflow is what happens when a write operation into the buffer keeps going past the end (writing into memory which has a different purpose). This is always a bug.
A buffer overflow attack is one which uses this bug to accomplish something that the program's author didn't intend to be possible.