Well this | is a so called "bitwise" or.
If you have a binary number like 0110 and another binary number like 0100 you can use the OR to connect them and "calculate" a resulting number.
In this case:
0110 | 0100 = 0110
What you do:
You look at each "position" in both number strings and if one of them 1 you write a 1 to the result:
0 | 0 = 0
0 | 1 = 1
1 | 1 = 1
0 | 0 = 0
result = 0110

The |= operatator does the same but also includes an assignment to another variable.
a |= b
is the same as:
a = a | b

Hope this makes some sense to you.