One-time pad is an encryption algorithm that encrypts the plaintext by bitwise XORing it with a randomly generated key of equal length. Keys are never reused. Essentially, at the -th position, the ciphertext byte can be determined as follows:
One-time pad is theoretically secure as long as the key is not reused and the RNG is cryptographically secure. A weak RNG algorithm does not render one-time pad useless, but it certainly undermines its “theoretically unbreakable” status.
Needless to say, it is a horribly impractical algorithm. Not only does the key needs to be agreed upon beforehand, it is also at least as large as the data.