The pseudo-random generation part of the algorithm just generates pseudo-random values (again, based on swapping bytes, like we did for the key), but also performs a XOR operation with the generated value and a byte from the data:
i := 0
j := 0
while GeneratingOutput:
i := (i + 1) mod 256
j := (j + S[i]) mod 256
swap values of S[i] and S[j]
K := S[(S[i] + S[j]) mod 256]
Data[i] = Data[i] xor K
endwhile
As you can see, the actual algorithm that was used was xor. However, all this swapping aims to generate a different key value every single time (similar to sliding key algorithms).