In this example, we have the input as three bits representing A, B, C and we have denoted them as X[0:2] which means we have three bits with the index 0 representing the MSB. We could have specified it as X[2:0] in which case the index 2 represents the MSB.
assign X[7:0] = 8'b00101011;
where the 8'b specifies that we are defining an 8-bit binary number and 00101011 is that 8-bit binary number. You can also assign parts of the number as
assign X[2:0] = 3'b101;
which assigns only the last three bits of X.