A Pokémon with the Pickup Ability has a 10% chance of picking up an item after winning a battle, if the Pokémon is not holding an item. The Pokémon with the Ability does not have to be used in the battle and the Ability still works even if the Pokémon has fainted.
From Pokémon Emerald onwards the items gained are dependent on levels, generally the higher level you are the better the items are.
Here are the items a Pokémon can pick up with the Pickup Ability in Pokémon X and Y:
The table indicates the percentage at which you're most likely to pick up an item. So for example at Level 91-100 you have a 30% chance of picking up a Revive, a 10% chance of picking up a Rare Candy, a Sun Stone, a Moon Stone, a Heart Scale, a Full Restore and a Max Revive, a 4% chance of picking up a PP Up and a Max Elixir, and a 1% chance of picking up a Leftovers and a Prism Scale equalling 100% in total.