It creates a 3 dimensional random array
x = rand(1:3)
is same as
x = rand([1,2,3])
you can change the values such that
x = rand([3,2,3])
will create a 3x2x3
elements of random array
Here is a well defined explanation of what rand function does