A slotted spoon in cooking or in the kitchen is used for removing food from a liquid while leaving the liquid in the pot or whatever the food is in.
For example if you're cooking meats in a slow cooker such as meatballs and you want to remove those meatballs from the slow cooker or pot you're boiling them in then you can easily remove those meatballs without removing the liquid with it.
I use a slotted spoon a lot when boiling meatballs in water and then I remove the meatballs using the slotted spoon while leaving the water in the pot.
That way the water doesn't transfer into the dish along with the meatballs.
The slotted spoon is basically just a way to strain water or other liquids from the food you're scooping up with it.
Slotted spoons are also sometimes used to serve foods prepared or packaged in juices, such as canned fruit and vegetables while leaving the juices behind.