The RSA algorithm has an public key which is generated by the multiplication of two prime numbers (p * q). These two prime numbers are the numbers you need to calculate the private key too. The private key is used to decrypt (M = C^d mod N) and the public key to crypt data (C = M^e mod N). The algorithms are often used to share the key with which the data will crypt and decrypt in an symmetric algorithm like the AES and DES. For example this is used to share the keys of the AES algortimus by an ssh connection.
More information: Wikipedia Article on RSA
The security of the RSA depends on the prime numbers p and q. I wrote a demo program that can find out p and q if it knows the public key N and N is not to big. The program is not perfect. It would run faster if it used a text file where a lot of prime numbers were stored. But maybe the code can help others too, and if anyone has an any code improvement proposals, please post it in the RSA forum post