Assuming you are working in decimal, first convert to binary (it is easier to read XOR in binary, normally you would work in hex for compactnes).
10 Dec = 1010 Binary
02 Dec = 0010 Binary
Exclusive OR (or XOR for short) gives a One when the bit in that position is a one on either of the inputs, and a zero on the other. In cases where the input bit is the same, XOR always gives a zero.
Input1 Input2 Output
0 0 0
0 1 1
1 0 1
1 1 0
So if you XOR 10(dec) with 2(dec) you get 8(dec):
Dec Bin
Input1 10 1010
Input2 02 0010
Output 08 1000