There's generally three broad categories of champions. Not all champions & playstyles fit nicely into them, but most of the time you will either play as one of these, a variation of one of these, or a combination of a couple of 'em. Please understand the examples below are very broad generalizations. For example, it's quite possible for Fiddlesticks and Annie to both be built with entirely different items, despite broadly falling into "ability power ranged casters".
Physical Damage (aka DPS)
Examples: Ashe, Yi, Tristana
Items: +Damage, +Attack Speed, +Critical Chance, +Lifesteal.
Why? These all combine in ways that multiple together (except Lifesteal). Concrete examples would be Infinity Edge (Damage, Critical Chance), Phantom Dancer (Attack Speed, Critical Chance) or Stark's Fervor (Attack Speed, Lifesteal). It's a terrible idea on any physical DPS champion to focus on only one of these and ignore the others. Ashe shouldn't focus solely on damage while ignore attack speed and critical chance.
Ability Power (AP)
Examples: Annie, Ryze, Anivia, Veigar, Fiddlesticks
Items: +Ability Power, +Magic Penetration
These are pretty straightforward. Some champions have abilities that do a lot more damage with increased ability power. Get more of it. Look under Magic -> Ability in the shop for things like Rod of Ages, Mejai's Soulstealer, Zhonya's Ring.
Tanks
Examples: Alistair, Amumu, Rammus, Singed, Cho'gath
Items: +Health, +Armor, +Magic Resistance; sometimes +Health Regen as well.
Tanks just taking a beating. Usually they are initiators for team battles, and can stand in front of a tower taking hits while a physical DPS teammate takes it down. They pretty obviously want health and ways to reduce enemy damage. Example items include Warmogs, Sunfire Cape, Force of Nature, Banshee's Veil, Spirit Visage. A few other important items for certain tanks include Aura items, both buffing teammates and debuffing enemies, such as Frozen Heart, Aegies of the Legion, Soul Shroud, etc. Finally, tanks are usually the teammate who should buy Oracle's Elixir if your team needs to see invisible wherever they go.
----
Things are never so simple, of course. There's "mage tanks" like Singed, who usually have at least one Rod of Ages for both the AP and the health. Many champions can be built multiple ways, such as Sion or Teemo, who can feasibly play as physical DPS OR using Ability Power (and there are mighty debates as to which one is better, but certainly people play both ways). There's also so-called "support" champions like Soraca, Zilean, and Kayle who don't necessarily fit into the nice square pigeon holes, although often you can pretend they are AP or Tank and get away with it.
Nearly every champion has mitigating abilities that affect item purchasing. Tristana and Twitch possibly don't need as much attack speed as some other champions because they have abilities that increase their attack speed. Yi and Sion both have built in bonuses to damage, so maybe they should focus more on criticals and attack speed early on (although Yi also has attack speed bonuses!) Tryndamere's Bloodlust triggers on critical strikes, so critical chance items are hugely helpful for him. Singed gets extra health from +mana items, making those more useful to him than other champions. Poppy's passive makes straight up health items stronger. Tryndamere, Mundo, Katarina and Mordekaiser don't even have mana pools, so +mana is entirely useless. Nidalee easily spams abilities, making it simple to trigger Sheen, Trinity Force or Lich Bane.
The enemy can affect your choices as well. Many champions might want to decide between various attack speed items. If the enemy has multiple high-armor tanks, Last Whisper is a given. If they have many physical DPS champions, the dodge bonus from Phantom Dancer can be crucial.