1- Do not post the same topic in multiple forums. Especially cut and pastes. This makes it more likely that no one will answer you
2- When you refer to "some code," please link as a reference what you have seen and worked with, so we can allude to your knowledgebase
Now, to help you out.
The range that you are talking about is derived from hardware requirements at some point. ADCs on many micro controllers are typically 10 bits - this means from 0 to 1023 is the maximum range. There are still other sensors or MCUs that can only output one byte of information (8 bits), so a range of 0 to 255 is possible. This is where that range is coming from. Assuming that the PID is controlling some kind of output, the 0-255 range is the output, many MCUs have an 8 bit timer that generates a PWM that, in turn, controls a motor. The 8 bit timer translates to 0-255, 255 being a solid 5 volt output, 0 being 0 volts, and all other values being a linear representation of time pulsed high and time pulsed low.
Hope this helps!