If you're determined to do this yourself, the first thing you should do is go to Park Tool's
Repair Help and Education website and look at the articles on derailleur alignment and adjustment and on chain repair. Sheldon Brown's website also has
useful tips about derailleurs (which he preferred to spell "derailers"), as well as many other things.