rd, rs1, immrd = rs1 | immori is bitwise OR with a constant — the immediate counterpart of or, just as andi is to and. The i suffix means immediate: instead of ORing two registers, it ORs a register against a fixed value written into the instruction. The OR rule is unchanged — at each bit position the result is 1 if either bit is 1 — so the constant acts as a mask that *sets* the chosen bits. (The or page covers the operation itself if it is new.)
The form is ori rd, rs1, imm: OR the value in rs1 with the constant imm and write the result to rd. Because OR sets bits without disturbing the others, ori is the tool for switching specific flags on when you know in advance which ones. ori t0, t0, 0b100 turns on the third-from-right bit of t0 (the 0b prefix marks a binary constant) and leaves every other bit exactly as it was.
That selective, leave-the-rest-alone behavior is the whole appeal. Configuration registers, permission flags, and status words are full of independent on/off bits, and ori flips chosen ones to on in a single step without a separate mask register.
The constant is capped at 12 bits, the same limit as andi and addi. To set bits beyond that range, load the wider mask into a register with li and use the register form or.