What happens to ashs old pokemon?

ash's old Pokemon go to the PC to get transported to a professor. ( like Oak, or Birch )