To keep a long story short, the basic objective is to get a Pokemon to survive even when it's using Struggle by Tricking Leftovers onto the Pokemon, putting it to sleep, and using Pain Split as a last resort. Struggle takes away 1/4 of the Pokemon's HP every time it hits; Lefties heals back 1/16 of the Pokemon's HP every turn. That means the Pokemon "loses" 3/16 every turn, technically. By putting the Pokemon to sleep, you give it more time to recover health with Lefties. And finally, if the Pokemon is below 1/4 HP, and you are not confident that it will stay asleep long enough to regain health, you use Pain Split with a high HP Pokemon in order to get the wild Pokemon's HP back to a higher level. It's really incredible.