Recycle allows the user to regain a held item, such as a Berry, once it has been consumed. Consumed items are not forgotten when the Pokémon is switched out. Recycle can recover items consumed by Bug Bite, Fling, Natural Gift, and Pluck, but not items lost by Thief, Covet, Trick, Switcheroo, or Bestow. Recycle will also fail if the item is collected by a Pokémon with Pickpocket.
It works for other consumable items as well, berries are only used here as an example. It would also work for example with Focus sash.
Recycle is an interesting move that has potential uses with single-use items, such as a Berry or Focus Sash.
Sources: Bulbaperia and Smogon's Recycle analysis
Hope I helped.