I will be Professer of Gadgets and Gizmos, how they do the technological machines in the Pokemon anime and possibly games.
Pokeball Theory:
Pok?mon are 96% pure energy. The energy is capable of converting the 4% of matter into another type of energy. However, by default this won't happen naturally.
Apricorns. Those nut-like things people made Pok?balls out of in ancient times. The inside of an Apricorn's shell contains "black holes" for energy - they suck it in and won't let it go. I've decided to call those "black holes" energy drainers just for convenience. Different types of Apricorns contain different kinds of energy drainers which suck in different types of energy - usually some form which is dominant in some Pok?mon and not others (such as Water Pok?mon, fast Pok?mon, heavy Pok?mon, etc.). All Pok?mon contain all types of energy, though, and so do humans. This means that short-term effects of being too near Apricorns include headaches and tiredness, and the long-term effects permanently affect the subject's health.
However, since Pok?mon are 96% energy, touching an Apricorn will result in being sucked in for a Pok?mon. Only a very strong Pok?mon can break the shell of an Apricorn once inside it, unless the shell is cracked open from the outside. The Apricorn's shell is very strong so cracking it open at all will require a lot of strength, though.
Ball makers like for example Kurt have special tools for that. They open the Apricorns, hollow them out (the energy drainers are in the inside of the shell and still covered with a glossy substance which prevents a Pok?mon from being divided between the energy drainers and never getting out) and then close them with hinges that will, as regular Pok?balls, open upon harsh impact with the ground (hence the need to throw the balls instead of just dropping them) or touching something that has enough energy in it to possibly be a Pok?mon (which caused Ash to catch a rice ball once; I mean, something they only eat twice a month or something has got to contain a lot of energy). The holes in the Apricorn's shell are also filled in, making the Apricorn balls harmless to trainers carrying them. This, of course, greatly increases a Pok?mon's chance to escape from the ball.
In a normal Pok?ball, different types of energy drainers have been put behind a few mirrors. The mirrors work like the glossy inside of an Apricorn's shell, reflecting the Pok?mon so that it doesn't get divided between the energy drainers. They have different types so that the ball will have an equal chance of catching all Pok?mon.
Lastly, a Pok?mon inside a Pok?ball is put into a virtual reality rather like The Matrix, except that it's just one room. The fancier the ball is, the better the room looks, with Luxury ball looking the best.