You can use grep -E
or egrep
for multiple matches:
ps aux | grep -E 'X|Z'
As per your suggested review I see that you want the 8th column to be either "X" or "Y". For that, you can do:
ps aux | awk '$8=="X" || $8=="Y"'
Example
$ cat a
hello
bye
blabla bye
other things
$ grep -E 'bye|hello' a
hello
bye
blabla bye