I use pokeballs a lot like the standard "place to rest/suspended animation" sort of things, but in many ways they're different. They're explained a bit in my 'fic, but meh...
Pokemon are unique in that their souls can be separated from their bodies easily and without great harm being done to them. In addition, the matter composing their bodies is kept in a highly volatile state.
When a pokeball capture beam strikes a pokemon, it disrupts the matter in the pokemon's body, converting it to pure energy (fission reaction). This massive release of energy is contained by the capture beam and reabsorbed into the pokeball. When the pokemon inside is released, the energy is converted back into matter, and the pokemon reappears. Pokemon don't die by this process because their consciousness, or soul, is linked to their energy and not to their physical form.
Pokeballs are manufactured to have a "one-time-use" energy charge that allows for the firing of the capture beam and the creation of a containment field to keep a pokemon inside the pokeball while it is being captured for the first time (after the first capture, no containment field is necessary--see below). If a capture fails, this energy will have been all used up, and the pokeball will be useless to capture further pokemon. At that point, trainers are encouraged to recycle their pokeballs, which can be done at any pokemon center--the pokeballs are then returned to the factory to be recharged and resold.
For an initial capture, the pokemon is not yet tied to the pokeball and therefore has to be restrained by force. When the pokemon's energy enters the pokeball and it closes, a containment field springs up to keep the pokemon inside. This field is temporary--it lasts only long enough for the pokeball to download and store a small amount of the pokemon's energy, which contains a fragment of its soul, to its permanent reserve. Almost always, the pokemon wants to escape and therefore fights the containment field. If the containment field is broken, the pokeball automatically releases the energy inside and the download fails.
If the download should succeed, then the containment field is terminated, as the pokeball is now permanently a home to that pokemon. They can always tell where it is from a distance, if only vaguely, and can always pick their pokeball out of a group. They also feel a constant pull from the pokeball--or rather, from the bit of their soul trapped inside. Runaway pokemon therefore often return for their pokeball, if they do not have the foresight to take it with them in the first place. This therefore gives the owner of the pokeball some measure of control over the pokemon inside, but it is not absolute--the pokemon still has free will and can, if it so chooses, turn on its trainer. Beyond the capture process, most pokeballs do nothing to foster the relationship between trainer and pokemon.
The release process is the opposite of the capture process. When released into battle, the pokeball utilizes a small portion of the pokemon's energy to kick-start the reaction that will convert energy back into matter and make the pokemon corporeal again. A further measure of energy is extracted and stored to power the return beam for use later. A pokemon does not require the pokeball's help to remanifest itself, however. Some pokemon learn to "snap back" into solid form without the pokeball's help, triggering an automatic release. This is how some pokemon, such as psyduck, are able to escape from their pokeballs. Generally, more powerful, more clever pokemon have an easier time doing this--it works on the same principle as escaping from the intitial capture field, and therefore legendaries and the like are much more likely to learn the escape trick quickly. And indeed, this is why few legendary captures last long--as soon as the legendary is healed of its wounds, it breaks out, kills its trainer, destroys its pokeball, and runs away.
While inside a pokeball, pokemon are stored as pure energy and data. Their consciousness persists, but their body is utterly destroyed. They feel no sensation, and their perception of time is fundamentally altered. In a pokeball, pokemon can be sustained for an incredibly long time--though not indefinitely. Their energy will slowly escape over time, eventually causing death if they are not released and cared for and their energy not restored. Inside a pokeball, it is airless and lightless--which makes relatively little difference, as pokemon no longer have eyes to speak of. In fact, the distinct clicking noise heard upon a successful capture is the pokeball locking down and expelling all air from its interior. Pokemon in storage do not need to breathe, and the removal of oxygen from the pokeball's interior helps prevent corrosion of the metal interior mechanisms.
Some brands of pokeball project images into a pokemon's conscience via computer simulation programs. In luxury balls, these are soothing, welcoming images that are intended to make the pokemon feel comfortable and at home. During the capture process, more powerful pokeball types use jarring, disruptive projections to distract a pokemon and attempt to keep it from escaping.
In the future, the above described pokeballs (later known as the soul-stealer models) are decomissioned and replaced with a highly advanced form of pokeball that can expand and collapse pokemon's entire physical forms in ways similar to that of black holes/the big bang. The reason for this switch in technology (the original pokeball model that I've gone on and on about sustains for a couple hundred years, is extremely reliable, and relatively inexpensive to manufacture) is an important plot point for the series of 'fics that I'm writing, so I won't say more here. If you read The Ninetales' Curse (that is, if I ever finish posting it here, eh heh), you may begin to ge t an idea of what exactly happens to change things so radically.