Ok so basicly you have 3 numbers one that will be used too decrypt the file we will call this d. and 2 do encrypt it these will be a and q.
d is any number but is usually EXTREEEEMELY long but for now we will make it 115
a and q are both prime numbers and must be co prime. and must be common factors of d
you will then get another number that can be anything which we will call e (for this will be 5)
lets say a and q are 13 and 17 we would then times these together too make n (221)
we would then do something which you cant really show on a computer

but ill give it a go
e*d equivalent to 1(moduloφ(n))
=> 5*d equivalent to 1(modulo192)
so basically if you want to encrypt 10 its would be 10^e(modulo(n)) = the encrypted number
so 10^5(modulo221)=108
then to decrypt it its 108^d(modulo(n)) = 10
=> 108^115(modulo221) = 10
this is basically it its been a while since I've done anything about it

so you may want to research it a bit else where
in case you didn't know modulo is the remainder of a division so 10 modulo 3 is one and 10 modulo 7 is 3 and 10 modulo 5 is 0
and φ is eulars theorem