stack
Stack
From Hackepedia
. Also the registers are "spilled" to the stack when they are required by the new function (because they have to be restored to their last state when the called function returns). Also dynamic variables and buffers are allocated on the stack, as compared to static variables which are usually placed into the data section of the process.
Buffer Overflows on the stack
Due to shoddy programming some programs allow buffers to be overwritten and if they are dynamic and reside on the stack a lot of crucial information can be clobbered. Attackers usually (and ingeniously) placed executable code into the buffer and made sure that the address of this code is written into the function return pointer on the stack. When the function then returned the malicious code would be executed. More about this can be read here.
Stack Protection in OpenBSD
OpenBSD has designed buffer overflow protection called W xor X (W^X) meaning that an area in the stack can either be executable or writeable but not both. This is supposed to stop an attacker from writing their malicious code into the buffer. When a buffer is detected as having been overwritten the process quits with a SIGABRT signal and dumps core. More on this is here. Other mechanism are Stack Ghost and Stack Gap to evade exploitation.