Firstly get some treats, such as a few bits on dried fruit, to offer to your hamster. Hold the treats between your fingers and place your hand just inside the cage door. With an aquarium you will need to place your hand down to the bottom of the cage. If your hamster comes over for the treats, open your hand and leave them on your fingers, close enough to your palm so that your hamster has to reach up on to your hand to get them. Try to keep your hand as still as possible and allow your hamster to investigate it.
If your hamster does not come for the food, do not try to force it. Instead leave the food at the edge of the cage and try again the next day, perhaps allowing the hamster just to eat from your finger tips to gain more trust.
Once your hamster is confident enough to climb onto your hand to get to the treats, you can slowly and gently try to pick it up. If your hamster jumps off at this point, then again leave it and try again the next day. You may need to do this several times before your hamster trusts you enough to stay on your hand.
Do not worry if this process seems to take a long time. All hamsters are different, and while some will quickly accept being handled, others may take over a month.