Many people don't realize how important it is to handle their pet guinea pig, and to do so often. When a guinea pig is not handled often, he becomes a bit wild, and the longer it has been since he has been handled by a human, the harder it is to convince him to be handled. Its much like a tame horse who goes for long periods of time without a rider - he becomes harder to saddle, and harder to handle.
Ideally, you should start out by handling your guinea pig once a day, for a short period of time. He may not like it at first, but he will gradually get used to it, and you will eventually be able to handle him for long periods of time, several times each day.
You might want to start by not actually picking the guinea pig up. Instead, when he is lying still, take the time to stroke him, so that he gets used to your touch. Don't try to force him to stay where you can pet him. If he wants to move away from you, allow him to do so. Once he allows you to pet him for extended periods of time, you should try holding him at least once a day. Again, don't force him to stay in your arms.
It is easy to tempt a guinea pig with treats. Unfortunately, this isn't really an ideal method for getting them adjusted to being handled. You will find that the guinea pig accidentally nips your hand or fingers when you are holding treats. The only way to avoid this is to never hand feed the guinea pig - or to use extreme caution when feeding the animal from your hand.
Talk to your guinea pig often, so that he learns how to recognize your voice. Talk in a calm, soothing manner, and he will actually start listening for your comforting voice when he feels frightened. Also, by being used to the sound of your voice, he will be much easier to handle if you talk to him while doing so.
It is vital that you remember that guinea pigs scare easily. If you frighten him while he is sleeping, he could actually suffer a heart attack and die. Never 'sneak up' on a guinea pig in an effort to startle him. Always start talking to him long before you actually touch him.
Finally, remember that the guinea pig is a small, fragile creature. Make sure that you handle him gently. When you pick him up, gently place one hand around his shoulders, and slide your other hand under him. Make sure that he is fully supported by your hand, before you take his weight. Once you lift him, bring him close to your body, so that he feels secure. Don't hold him like a baby - tummy up. Instead, hold him with his tummy facing the floor. Never squeeze the guinea pig, as this can really cause life threatening injuries.
If you allow children to hold your guinea pig, they should sit down, and you should hand them the guinea pig, by placing it in their arms. Never leave a child unattended with a guinea pig, as they could cause injury to the animal, without meaning to.