The Trade Machine is used to trade Pokémon with other players. It can be mined using a pickaxe. Trading a Pokémon will reset its happiness to 70.
Trading Machines can be found inside Pokémon centers. They can also be crafted.
Several Pokémon only evolve when traded using the Trade Machine, making these Pokémon unavailable legitimately in singleplayer.
Some evolutions also require that the Pokémon is holding a specific held item.