taken from my discrete mathematics textbook:

The RSA cryptosystem is based on modular exponentiation modulo of the product of two large primes. Each individual has an encryption key consisting of a modulus n = pq where p and q are large primes, say, with 200 digits each, and an exponent e that is relatively prime to (p - 1)(q - 1). To produce a usable key, two large primes must be found. This can be done quickly on a computer using probabilistic primality tests. However, the product of these primes n = pq, with approximatley 400 digits, cannot be factored in a reasonable length of time.

In the RSA encryption method, messages are translated into sequences of integers. This can be done by translationg each letter into an integer, as is done with the Caesar cipher. These integers are grouped together to form larger integers, each representing a block of letters. The encryption proceeds by transforming the integer M, representing the plain-text (the original message), to an integer C, representing the ciphertext (the encrypted message), using the function:

C = M^e mod n

Distilled from: Discrete Mathematics and its Applications
By Kenneth H. Rosen
Published by McGraw Hill