Poké Balls are enigmatic objects indeed. They seem to be one of the two technological methods for Pokémon storage found throughout the Pokémon world (the other being PC Storage), and alongside its counterpart, is among the most complex creations around. So how does it work? Canon does tell us a little bit about the inner mechanics of the Poké Ball. We know that it's a capsule, and we know that it stores Pokémon by converting them into a plasmatic state. However, if the Pokémon world is anything like ours, that certainly that wouldn't be possible. You can't convert anything into an energy state, and even if it were possible, whatever was being converted would probably be totally warped from the form it once took, almost certainly to an irreparable state. Therefore, the idea that a Poké Ball can transform a Pokémon into energy and vice versa seems absurd and impossible from our standpoint.
Of course, that's from our standpoint. One thing you can't assume about the Pokémon world is that it must be as similar to ours as it can be because clearly that isn't the case. Perhaps, if Pokémon were more similar to the animals of our own world, this would be a more viable prospect. However, despite the fact that many of do bear resemblances to our earthly equivalents, Pokémon are not animals; they are Pokémon. Animals cannot shoot fire from their body, or summon lightning to attack their transgressors. Pokémon and animals are very much different, which leads me to believe that the organic makeup of a Pokémon is probably considerably different, as well.
Animals, and life as we know it in general, bases its individuality based on strands of DNA found within its cells. It is certainly a possibility that Pokémon rely on a different compound altogether. To compensate for the constant transfer between Poké Ball and physical form, Pokémon may possess far more DNA than the average organism here on Earth. In the moments before a Poké Ball captures a Pokémon, it takes note of the Pokémon's individual DNA structures. When a Pokémon is recalled into its respective Poké Ball, the Poké Ball literally breaks down the Pokémon's organic form and recalls the DNA data it stored earlier, transforming the Pokémon's consciousness into a generated plasmatic state and bouncing it around inside the Poké Ball to prevent it from becoming dormant and dissipating, likely using the mirrors found in the official diagram of a Poké Ball. When a Pokémon is sent back into battle, the Poké Ball converts the plasmatic data into the organic form it was derived from, effectively turning the Poké Ball into its original state.
This may also explain why Poké Balls can only hold one Pokémon at a time. A Poké Ball may simply be unable to take in multiple DNA structures at a time, and can consequently only keep track of one given Pokémon consecutively. Poké Balls may not be overwritable, which explains why your Poké Ball disappears after releasing a Pokémon. Furthermore, unique Poké Balls improve catch rate because they are "programmed" to be more effective on Pokémon with a specific gene.
That does not, however, explain why Pokémon can break free of Poké Balls, even after they have been captured, and what the difference between standard, Great, and Ultra Balls is. If a Pokémon is, in fact, converted into a plasmatic form of data when inside the Poké Ball, then leaving this plasmatic data dormant may result in its dissipation. This is why the plasma is reflected inside the Poké Ball at all times. As an automatic mechanism to prevent the death of a Pokémon (yes, Pokémon really can die), Poké Balls eject dormant plasma. Thus, a Pokémon in control of its plasmatic entity may be able to stop its own movement and trigger the automatic ejection response in the Poké Ball. (Pokémon in the Apricorn days may not have been so lucky!) Therefore, the difference between standard, Great, and Ultra Balls is one of either two options: the former being the amount of time it takes for the response to activate, rising as the Ball performance ascends, consequently causing the Pokémon's plasmatic entity to lose its steady and continue moving; and the latter being the reflective power of the mirrors inside the Poké Ball, also rising as the Ball performance ascends, making it less likely for the Pokémon's plasmatic entity to stop itself from moving. The latter is more likely, since a Pokémon that remains dormant too long may dissipate before the automatic ejection activates, making the former more dangerous. This also explains why more powerful Pokémon are more resistant to a Poké Ball's grasp; they have greater control over their plasmatic entities, and cannot be contained as easily as their weaker counterparts.
The Master Ball seems to be a beast all its own. If the latter of my previous two theories is correct, than the Master Ball may boast little interior room and a capsule decorated with mirrors all the way around; this seems unlikely, however, since the receptors that pick up a Pokémon's DNA structure would be nowhere to be found. Alternatively, the Master Ball may just be a dangerous Poké Ball in general, with no automatic ejection mechanism whatsoever, making it impossible for Pokémon to escape its hold. It may very well be a mixture of both, but this would still make it possible for a Pokémon to break free, no matter how small the likelihood is. However, given that the highest catch rate possible is three, a Master Ball that can catch any Pokémon with a Catch Rate up to one is certainly plausible.
If Pokémon can be transformed into physical data, surely they can be transformed into data as we know it. When a Pokémon is transferred into the PC, its physical data is converted into a string readable by the PC. When the Pokémon is withdrawn, this data is transformed back into plasmatic data, which is then transformed back into the Pokémon itself. In the Pokémon anime, it has been made clear that the Poké Balls of a Pokémon are retained by the Trainer even if the Pokémon is deposited into the PC; the PC may very well pull the data straight from the Poké Ball itself.
If data is indeed how Pokémon are catalogued, then wireless transactions between Poké Ball and PC seem plausible. However, this is likely a risky procedure, as lost Pokémon data can probably not be reacquired.