Nejcar:
What happens if I would write a program like this:
...
When the i hits 32,767 would it go back to 0 or would it go to -32,768 or just stay 32,767, and
what happens with long or unsigned long?
Thank you

Answer is well explained if you look at learning > reference at the top of this page. Here is the link to minimize your work, but you have to click and read yourself, as I can't do that for you.

Nejcar:
When the i hits 32,767 would it go back to 0 or would it go to -32,768 or just stay 32,767, and
what happens with long or unsigned long?

The contents of the variable would go from 0x7FFF to 0x8000. For a signed integer that's -32768. For an unsigned integer, long integer, or unsigned long integer that would be 32768.