what is happening when i run this code line?
You are putting the values of 

u(2),...,u(10)


in a $3\times 3$ matrix with the shape of the index matrix $x$. This could be written simply as $$x2_{(i,j)}= u (x_{(i,j)}+1),\;(i,j)\in[1,2,3]\times[1,2,3]\,. $$ 

For further matrix shape conversions, you can have a look at vectorization or matricization, and you can find notations in chapter 3.4 Matricization of a tensor of Multilinear operators for higher-order decompositions, T. Kolda, 2006.