Here's a more detailed description of the RSA algorithm, though the Wikipedia entry is pretty good also.