rd, rs1, shamtrd = rs1 >> shamtsrai shifts bits to the right by a fixed amount, filling the vacated top positions with copies of the sign bit so that negative numbers stay negative. It is the constant-amount version of sra (which explains the sign-preserving fill and why it matters); the i means immediate, a constant written into the instruction rather than read from a register.
The form is srai rd, rs1, amount, with amount a fixed value from 0 to 31. Because each place shifted right halves the number, and the sign is preserved throughout, srai performs signed division by a power of two: srai t0, t0, 1 halves a signed value whether it is positive or negative, srai t0, t0, 3 divides by 8.
The one quirk to remember is rounding direction. srai always rounds downward, toward the more-negative side, rather than toward zero. So -7 shifted right by 1 gives -4, while the div instruction dividing by 2 would give -3. For non-negative numbers and for exact divisions the two agree; they differ by one only on negative numbers with a remainder. In most graphics, audio, and signal work the downward rounding is exactly what you want.
The rule of thumb across all four shifts: use srai for signed numbers being divided, srli for raw bits or never-negative values, and the non-i forms (sra, srl) when the shift distance is computed at runtime rather than fixed.