Scouting is the art of analysing the opponents team without revealing yours. There is 6 Main ways to do this:
1. Force Switching
2. Protect/Detect
3. Subbing
4. Immunity
5. Sacrifice
6. Abilities
#1 Force Switching
Force switching is rather easy. You use roar or whirlwind to force a switch therefore cycling through your oppoenents pokemon. Also sending in a counter to a pokemon can result in a force switch.
#2 Protect/Detect
Basically Protect to scout your opponents moves.
#3 Subbing
Same as protect/Detect. Advantages vs. Protect: Do not have to skip a team.
Disadvantages vs. Protect: 25% damage, you must be faster.
#4 Sending in a pokemon with a immunity to the choice move being used. Example sending a jolteon in vs a specced starmie using thunderbolt. This is also called a force switch.
#5 Sacrifice
Basically send out a pokemon as death fodder to do one of these:
A) See a switch
B) Work out what item there holding
C) Work out what move there attacking with
This way also sacrifices 1 pokemon for a safe switch into a counter.
#6 Abilities
Simple, Use abilities like Trace and Frisk. You can also use moves like Trick and Knock Off.