Does setting a value always mean setting a Arduino pin?
Note that this is just a C/C++ integer declaration, assigning a value to a variable, like any variable (irrelevant if it is for pin numbers).
You don't have to use a variable, there are similar variations:
Variable
int pinNumber = 13;

in begin:
pinMode(pinNumber, OUTPUT);
digitalWrite(pinNumber, HIGH);

Const
Preferably I like to use a const:
const int PIN_NUMBER = 13;

Or even better, since it always is a low value:
const uint8_t PIN_NUMBER = 13;

And use it with capitals.
pinMode(PIN_NUMBER, OUTPUT);
digitalWrite(PIN_NUMBER, HIGH);

#define
#define PIN_NUMBER 13

pinMode(PIN_NUMBER, OUTPUT);
digitalWrite(PIN_NUMBER, HIGH);

The reason variables are used, is that when you want to use another pin number, you only need to change it in one place, making the sketch better maintainable/adaptable.
I don't know what happens when you give an illegal number (you can try it out yourself).