intIntegers are your primary data-type for number storage. int store negative numbers with a technique called 2's complement math. The highest bit, sometimes referred to as the "sign" bit, flags the number as a negative number. The rest of the bits are inverted and 1 is added.
int var = val;
When variables are made to exceed their maximum capacity they "roll over" back to their minimum capacity, note that this happens in both directions. Example for a 16-bit int:
int ledPin = 13;
int x; x = -32768; x = x - 1; // x now contains 32,767 - rolls over in neg. direction x = 32767; x = x + 1; // x now contains -32,768 - rolls over