You need to be very careful when holding a guinea pig. They have a Very Delicate Spine and Hind Legs. So Care with Handling must be taken in order to not hurt the Guinea pig.
To get a guinea pig out, it’s easier to come from above, but this will scare the Guinea Pig, as their main predators come from above - birds.
Try to come from the side of the Guinea pig, let it sniff you then put one arm under neath the guinea pig, then lift it a bit, with the other hand, put it under the spine and hind legs.
Try and hold him or her on your lap or chest so they feel safe because they're close to you. Then just stroke them down their back.