It is always important to remember that guinea pigs are a prey species (i.e., they are eaten by other animals). They are gentle animals but nervous by nature and will try to escape if they feel threatened. Being picked up and carried is not a natural situation for these small animals, so an average guinea pig is not going to like to be held (especially if they are not used to it).
You should not allow small children to carry a guinea pig, and you should also supervise older children, as they might accidentally hurt or drop them.
The first thing to do is to calm and reassure your little companion. Approach them from the front, gently talking to them and stroking them on the head. Offering a favourite food as a reward will help them to associate handling with a pleasant experience.
Once your guinea pig is calm and relaxed, place one hand under their chest (just behind the front feet) and, with your other hand supporting the hindquarters, gently lift the guinea pig up to your chest or cradle them in your arms. Guinea pigs hate being lifted without feeling their whole body is supported and being placed on their back is simply terrifying (as their instincts tell them this means they are about to be eaten).
Keep a firm grip on them, but do not squeeze at all. During this time your guinea pig will struggle and squeal – this is normal, but if they are becoming stressed, lower yourself down to the floor to reduce the chance of fall injuries. Avoid putting your guinea pig down when they wiggle. If you put them down every time they struggle, they’ll learn that all they have to do is wiggle to get back in their cage. Instead, cuddle them, speak softly, stroke their head, and give them a treat to reassure them and help them relax. Just be patient – over time, with rewards (treats, praise and gentle strokes) being associated with handling (positive reinforcement training), they will become more used to and accepting of handling.