Now to the present, with Gen V, there’s this neat function called Team Preview. Most people will tell you they hate it, but it’s actually more useful than you think. It’s not just your team being previewed, it’s also your opponent’s team. From my own experience, it doesn’t matter at all if they know the Pokemon, as they don’t know your movesets for sure. You’re also able to use their knowledge against them, but that’s for predictions, not analysis.
First GlimpseIn Team Preview, you get to choose the order of your Pokemon, and you get a look at your opponent's team. All you see are the icons, gender, and level. This isn't much to look at. But think about what the Pokemon do. Do they wall? Do they set up and sweep? What kind of roles do they normally play? Not only that, but also keep track of their types. The first way to break a team is to find the type they don't resist and then use that type against them. A solid team will not have this weakness until some Pokemon are KO'd. The main thing though, is to find their roles. Usually, an offensive team will be very speedy and a stall team will be very bulky. Balanced teams obviously balance both types out. The most obvious thing in Team Preview is the team's general playstyle, and you will then know what kind of team you're facing.
Second ThoughtNow that you know what the playstyle is, there's a larger thought process to figuring out what their support is. Nearly every team has one Pokemon they need that will cause the team to fall apart. Find that one Pokemon, and you will be able to constantly put pressure on it to prevent it from doing its job. Some teams, however, are supported much better than this, and can operate just as well without a specific Pokemon. Most of the time, though, it depends on what you're using. No team is perfect, so every team has a threat that isn't covered.
An example team:
If you followed the first step, then you can see this is a balanced team. If you've also read the Competitive Battling guide, you'll probably also notice the Rotom-W/Gliscor/Jirachi core. As you can see, this is a Sandstorm team as well, with Tyranitar and 4 other Pokemon being immune to Sandstorm. Don't think rain has the advantage here, though; Tyranitar's bulk, as well as Jirachi's and Rotom-W give Rain teams headaches. On the contrary, this team's weakness is Sun, with mainly only Terrakion to combat Sun. So clearly, a Sun team should aim to take out Terrakion before it starts doing its damage.
One more thing is to note that some Pokemon only do one thing, and many Pokemon may have the same viable role. On teams, you will not see two Pokemon doing the same thing (such as two using Stealth Rock or two using Rapid Spin). Unfortunately, it's rather difficult to find out which does what only through Team Preview.
Observing While BattlingObviously, you won't find everything through Team Preview. Some things you will have to keep note of while battling. In Wi-Fi battles, many experienced players keep a pen or pencil and some paper handy to write down what they see. Keep track of what moves your opponent uses, as only certain sets will use certain moves. For example: a Ferrothorn using Thunder Wave will not use Gyro Ball, because it will weaken Gyro Ball that way. Another example is if a Dragonite uses Thunder Wave; if it does, you know it will have Substitute, Roost, and Dragon Tail. Keeping track of items will also do you good. If a Pokemon does not show any alterations to its HP during each turn other than weather (Leftovers, Life Orb, etc.), then that leaves one or two other items it possibly holds. For offensive Pokemon such as Starmie, it means that the user is probably Choiced, but do not assume this immediately. Some offensive Pokemon use Expert Belt to bluff Choice items. As for bulkier Pokemon, it depends. A Ferrothorn without Leftovers will most likely be carrying Shed Shell to escape Magnezone, or Rocky Helmet to discourage Fighting types or Fire Punchers. This also means the Ferrothorn has Leech Seed so that it still has recovery. Set-up sweepers like Dragonite will most likely carry a Lum Berry to avoid status. By observing both items and moves, you will be able to start guessing at your opponent's moves and then predict them.
ConclusionAs you begin to do this more and more often, it will be part of your habit or normal thought process. Many players do not think this far into battling, and only realize it after it's been done. An important part of battling is memory, and remembering these things will help you win in future battles.