ach one or zero is called a bit and each group of eight bits is called a byte. In computer science, a byte is a unit frequently used to give the size of data. This explains why the RGB system chooses the scale from 0 to 255 to represent each of red, green and blue: every colour in this system can be given as three bytes.
A huge topic that we will not touch is the chemical mechanisms by which the colours actually appear on the monitor's screen.
Now we can see that a computer, indeed, colour by numbers. Binary numbers, that is.