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.