A StackOverflow happens when a function call is made and the stack is full.
Just like an ArrayOutOfBoundException. It cannot corrupt anything, in fact it is very possible to catch it and recover from it.
It usually happens as the result of an uncontrolled recursion, but it can also be caused by simply have a very deep stack of functions call.