It sounds like you might be thinking of trapping Pokémon, which is a strategy used in competitive battling. This involves using a Pokémon with a move that prevents the opponent from switching out, such as Whirlwind or Roar.
If you're looking to catch specific Pokémon in Pokémon Diamond, you'll need to use Poké Balls and find them in the wild.
Please let me know if you have any other questions!