The & symbolises a bitwise 'and' operation. It is useful for masking (clearing bits which do not interest you at the moment), as its result is 1 only when both input bits are 1:
0 & 0 = 0
0 & 1 = 0
1 & 0 = 0
1 & 1 = 1
The 0xFF is actually 11111111 in binary, so it is a byte with all bits set to 1.
Here the task is to dissect a 32-bit 'AAAAAAAARRRRRRRRGGGGGGGGBBBBBBBB' integer into four 8-bit (or 1-byte) groups, containing the 3 colors (R, G and B) and the alpha channel.
If you & it with 0xFF:
Shifting operation 'puts' the number some digits left or right, dropping whatever part gets 'out' from the 32-bit. 'New' bits also appear, there are some rules about that as Shai.i briefly mentions.
000000000000000000000000BBBBBBBB, so we have a 32-bit number, containing the Blue channel only, all the other bits are cleared with the mask.
Here let us pretend that the new bits are going to be 0. For example let us shift right the color 'number' with 1:
As our task is to extract bytes, shifting by 1 is not too useful, but shifting by 8, 16 or 24 is cool.
0AAAAAAAARRRRRRRRGGGGGGGGBBBBBBB, a 0 shifted in from the left, and a B was dropped from the right
Let us check how the "int red = (rgbDataMatrix[i][j] >> 16) & 0xff;" works:
So something like this is happening in the code.
0000000000000000AAAAAAAARRRRRRRR, so 16 zeroes appeared on the left, and the GGGGGGGGBBBBBBBB disappeared on the right
Here we have a 32-bit number, which contains a mixture of alpha channel and red channel, so that is why the masking is used in the code:
000000000000000000000000RRRRRRRR, the result contains the R bits only