You can either castrate with rubber rings within the first week of life, or it can be done by the vet later in life, but I am not sure if the billy smell will go with the balls...
Also if you are talking pygmies I would imagine that everything is pygmy-sized so you may struggle to fit a ring to a very young billy kid.
It is done the same way as for lambs, if you have a friendly sheep farmer nearby you might be able to go and watch/learn. It is something that comes with practice, and yes it is quite painful for the little fellow. My lambs are usually up and suckling again within the hour, and it is somehting that I do out of necessity, also to my male goat kids. If the kid is being disbudded then it is easy for the vet to slip on the ring while the kid is under anaesthetic.