There are many factors that go into a competitive Pokemon team. Pokemon typing, move coverage, recovery, stats, the player's ability to adapt, predict when to switch out or when their opponent is, etc. Depending on the skill of the players, battles can last between 20 turns and 200 turns. (a turn is defined by one action per player). To an outsider, all these things can be very confusing and may make you wonder, why would anyone go through all that trouble of catching specific Pokemon, spending hours upon hours to level them all up, and praciticing player tactics, all for 20-30 minutes of fighting a battle? Simply put: it's a lot of fun. The process for forming a team can be sped up drastically through several methods, some of which I'll cover below. For those who don't want to spend years grinding for the perfect Pokemon, the most important method is arguably Arbitrary Code Execution (ACE), which may be monotonous and confusing, but it by far the fastest way to build a team in Pokemon Gold and Silver. ACE is covered in the page of the same name.
One of the most obvious factors that goes into any battling is type advantages and disadvantages, both for Pokemon typing and move typing. Moves that are super-effective against an opponent cause twice as much damage. Inversely, moves that are not very effective cause half as much damage as normal. Moves that have no effect against an opponent, such as a Ground-type move against a Flying-type Pokemon or a Fighting-type move against a Ghost-type Pokemon, deal zero damage... because there was no effect. You can't punch a ghost, and an earthquake can't affect something that's in the air. The chart below shows every matchup that you can find in Pokemon Gold and Silver.
Since each Pokemon can have up to two different typings, it's important to know how to deal with dual typings, and what moves they can pack. It's equally as important to know which moves your Pokemon knows so it can deal with as many threats as possible. Say you have your Machamp (Fighting Type) already out, your opponent sends out a Steelix (Steel/Ground Type), which you know is slower than you, but it can faint your Machamp in one Explosion since you've taken a bunch of damage beforehand. How do you deal with it? You don't want to switch out, because you have an Attack-Stat boost from Swords Dance, so you weigh your options. Do you use Cross Chop, a powerful Fighting-type move, or Earthquake, a general-purpose but reliable Ground-Type move? Either one is a fine choice, but because of one simple factor in damage calculation: Same-Type Attack Bonus (STAB), Cross Chop has a decent chance of One-Hit KOing the Steelix. If you don't take the opponent's Steelix out quickly, it has a chance to user Explosion, so you chance getting the OHKO. Miraculously, the Steelix goes down in one hit and you escape unscathed.
But, what if the matchup was unfavorable? What if you had out your Zapdos (Electric/Flying Type) up against a Tyranitar (Dark/Rock Type), where you know you are about to be 2-Hit KO'd by Rock Slide (Rock-type Move). Given that your opponent has taken quite a bit of damage before switching in and you are faster than your opponent, you have a few options. You could switch out to a more capable Pokemon, but that would leave that one open to taking unnecessary damage from Rock Slide, which could mean the difference between a clean or messy late-game later on. You then remember you trained your Zapdos with Hidden Power Fighting (Hidden Power is a move that bases it's type off of the user's stats, this one is Fighting Type), which wipes out the opposing Tyranitar in two hits. Although you don't get STAB with Hidden Power Fighting using Zapdos, the fact that you had some sort of defense against a foe that would have knocked you out without that coverage move means that you have a greater chance of winning the battle.
As much as dealing damage to your enemy is important, so too is recovering health points (hp) in the middle of battle, since this too can mean the difference between a swift loss and a long-fought victory. Not very many Pokemon have the ability to heal large amounts of hp in a move, -- mainly because their movepool doesn't support it, -- so when you have the option, it's best to take it. The few good recovery moves are "Recover", "Soft-Boiled", and "Synthesis", all of which heal a base 50% of a Pokemon's hp. 99% of competitive movesets deemed standard for competitive play by Smogon, a renowned community focused on all things Competitive Pokemon, use Leftovers as a means of recovery. Sometimes it's the only means of hp recovery, so much so that it's unwise to give your team any other items. Since there aren't very many good items to talk about, (Leftovers for recovery, Thick Club for Marowak stat-boosting, Bright Powder for anything else), there won't be a section dedicated to items.
Which Pokemon to Use
A team is comprised of 6 unique Pokemon, each hand-picked to serve a specific role or cover certain types. There are many roles to choose from, and these roles are mostly dictated by what moves your Pokemon knows: Mixed Attackers to cover a wide range of threats with their many move types, Walls to soak in damage using their strong defense stats, Setup or Spinners which deal with setting up or removing entry hazards, stat boosts, or status moves, Sweepers to take care of heavily-damaged opponents, etc. By looking through Smogon's Tier List, you can mix and match whichever Pokemon you need to fit the wide range of roles you want on your team.