You are asking two questions: how to construct a PDA for the language, and why this language is context-free while the same language with the condition $x \neq y$ replaced by the condition $x = y$, is not. I will only answer the second, since for the first question there are known algorithms.
The reason that your language is context-free is that we can rewrite it as follows:
$$
\{ \Sigma^i a \Sigma^i \Sigma^j b \Sigma^j : i,j \neq 0 \} \cup
\{ \Sigma^i b \Sigma^i \Sigma^j a \Sigma^j : i,j \neq 0 \}.
$$
This gives a different description of the language as the union of concatenations of context-free languages. A similar trick just doesn't work for the language $\{ xy : x=y \}$.
Here is a different example. Consider the following two collections of natural numbers (without zero):
- $A = \{ x \cdot y : x \neq y \}$.
- $B = \{ x \cdot y : x = y \}$.
The set $A$ consists of all natural numbers other than $1$, whereas the set $B$ consists of all squares. Even though we defined them in a similar way, the set $A$ has a much simpler description, while $B$ doesn't.