Is it ever explained how a Poké Ball works? I know that you throw it a Pokémon, and if it is weak enough, you catch it. But is the process ever explained? Does it work on humans? Do most Pokémon like being held in a Poké Ball?
A pretty clear answer is given here.
To summarize it,
The Pokemon is absorbed into the Poke Ball, and will try to fight back unless it likes the trainer. That is why the Pokemon needs to be weakened: if it is too strong, it will break free. If the Pokemon does break free, the Poke Ball will break and become unusable.
It was programmed to not catch humans, though it sometimes might accidentally catch other things it is thrown at, such as the rice ball Ash throws a Poke Ball at once.
The Pokemon becomes loyal to the trainer once they are caught, and they will generally follow the orders of the trainer.
To quote the page:
The inside of a Poké Ball is "designed to be as comfortable for the Pokémon residing within", although this is not necessarily true. The Pokémon inside may simply be sleeping, or completely unaware of its own existence. Pokémon are, however aware when inside their Poké Ball — by calling their name, the Pokémon will emerge from its Poké Ball almost immediately.
Not all Pokemon will stay in their Poke Ball, however. Pikachu refuses to stay in the Poke Ball, and in the game Pokemon Yellow, Pikachu follows behind the player. Pokémon Soul Silver/Heart Gold let the first Pokemon in a party follow the player.
The Pokemon are shown to be transferred on data chips when being moved to the Pokebox, and only one Pokemon can be stored in each Poke Ball.
The mechanics in Pokémon Legends: Arceus give us an explicit explanation for how a Poké Ball works, so a new answer to this question is necessary. In this game, rudimentary Poké Balls are made from only a tumblestone and an apricorn. The apricorn is simply a tough fruit that is hollowed out, though what the tumblestone is and what it does is a bit of a mystery. The tumblestone is presumably used to make the latch, the air hole on top of the ball, and all other mechanical-looking components. As far as I can tell, apricorns have appeared in previous games, but tumblestones have not.
The real wonder of this new game, though, is what it tells us about the Pokémon themselves. Early on in the game, it is stated that Pokémon have the mysterious power of being able to become smaller. Knowing this, we can determine that Poké Balls need not be some kind of wonder technology, because the tough part (the shrinking) is done by the Pokémon! And since presumably humans do not have this ability to shrink, that explains why they can't be caught by Poké Balls.
The quote from Professor Laventon is as follows:
You'll recall, of course, that Pokémon possess the strange power to shrink themselves down. With the Poké Balls we craft, we can make use of that power to catch them!
There's still some question of how it works exactly. Do the Pokémon simply shrink into the ball because they're surprised, or does the tumblestone or apricorn stimulate them to do so somehow? How do the Poké Balls open and close like that?
But even with all these questions, this would seem to be the most complete explanation for how Poké Balls work, as far as I'm aware. There's the capture net thing in the Adventures manga, but that doesn't really explain much.
Some fans are kind of partial to the theory that Pokémon get turned into energy or data or something, because of the bright light when Pokémon get hit by Poké Balls (I never liked this theory, to be honest). Under this new explanation, I would presume all the light seen when a Pokémon is hit and captured is due to light and heat being released during the miniaturization transformation.
Another cool thing about this new explanation from Pokémon Legends: Arceus is that it can be used to neatly explain why you can't capture a fainted Pokémon. If turning small is a conscious process, then a Pokémon would need to be conscious to be put into a Poké Ball. Alternatively, when knocked out, the Pokémon might turn small so that a trainer is unable to find them. It doesn't seem an incorrect notion, as some Pokémon in Pokémon Legends: Arceus such as Chancey run away from the player and eventually disappear, and this is presumably because they're shrinking to get away.