Heya, no problem! The trick is that he's writing to a memory address on the stack (the return address), obviously. I'll explain how he manages to do that:
char shellcode[] = "blahblah";
int main()
{
/* Declare a variable on the stack. */
int *ret;
/* &ret is the address of the variable ret, which is a stack location. It's incremented by 2*sizeof(int) (pointers
* always increment by sizeof(datatype)). &ret+1 would be the saved frame pointer, and +2 would be the
* saved return address. Don't forget that the stack grows downward, so you increment to move back on
* it. Assign the location of the saved return address to ret. */
ret = (int *)&ret + 2;
/* Set the memory pointed to by ret (which happens to be the return address) to the shellcode. */
(*ret) = (int)shellcode;
/* When the function returns, it pops off the saved ebp, which wasn't modified. Then it pops off the return
* address, writing it to EIP. Since the return address now points to the shellcode string, the shellcode is
* executed. */
return;
}