https://en.wikipedia.org/wiki/One-time_pad
Example:
h e l l o message
7 (h) 4 (e) 11 (l) 11 (l) 14 (o) message
+ 23 (X) 12 (M) 2 (C) 10 (K) 11 (L) key
= 30 16 13 21 25 message + key
= 4 (E) 16 (Q) 13 (N) 21 (V) 25 (Z) (message + key) mod 26
E Q N V Z → ciphertext
https://en.wikipedia.org/wiki/Stream_cipher