The following line of code checks to see if the current character is the null terminator. A null terminator indicated the End Of String.
str[j] != '\0'
This is usually used in a while loop to check if the last charecter of the string has been reached. If it is the last char, the loop will terminate.
Check this resource: http://www.cprogramming.com/tutorial/c/lesson9.html
I assume you want to remove characters common to both strings. You could do this:
int i=0, j=0, index=0;
while(str1[i] != '\0')
tmp = str[i];
while(str2[j] != '\0')
if( tmp != str2[j] )
result[pointer] = tmp;