As was mentioned in comments, encryption over javascript is not very secure, as is described in the article: http://matasano.com/articles/javascript-cryptography/, but basically, someone can view the source and by using debugging tools they can determine how the encryption is done.
At times people can also grab the source as you are sending it.
Now, given this, encryption may be useful, if you don't fully trust SSL and you want to send something sensitive over the Internet.
So, you run into a problem of how to encrypt.
RSA encryption is good for small messages, because it is slow, so, for example, you want to encrypt a password. Then, the server could have included the public key, that it generated for this page, and your program encrypt.
Encryption is not going to be simple, but you can look at the source to this project and it may help guide you.
For an example, you can look at this page, where I got this:
function RSAdoEncryption()
{
var mod=new Array();
var exp=new Array();
var s = r2s(document.t.pkey.value);
var l = Math.floor((s.charCodeAt(0)*256 + s.charCodeAt(1)+7)/8);
mod = mpi2b(s.substr(0,l+2));
exp = mpi2b(s.substr(l+2));
var p = document.rsatest.plaintext.value+String.fromCharCode(1);
var pl = p.length;
if(pl > l-3)
{
alert('In this example plain text length must be less than modulus of '+(l-3)+' bytes');
return;
}
var b=s2b(p);
var t;
var i;
var startTime=new Date();
var enc=RSAencrypt(b,exp,mod);
var endTime=new Date();
document.rsatest.ciphertext.value=s2hex(b2s(enc));
document.rsatest.howLong.value=(endTime.getTime()-startTime.getTime())/1000.0;
}
Your last sentence doesn't make sense but I will guess.
There are two basic types of encryption, symmetric and asymmetric. RSA is an example of asymmetric, so the key used to encrypt is different than the key to decrypt. That is what is meant by a public and private key. One key is shared with people but it doesn't help you find the private key if you know the public key.
Symmetric encryption is where the same key is used to encrypt and decrypt. IDEA, AES, Blowfish are examples of symmetric keys.
I expect that method is the encryption algorithm but it can also refer, perhaps, to padding, where you add extra garbage or random characters at the end to make the message longer.