When you're comparing armor and weapons, there's a number of things you should consider.
The first is the basic stat of the item - this is typically in large print. On armor, this is the "armor" value, and on weapons, this is damage per second (or "DPS" for short). Generally speaking, the higher the level/tier of weapon or armor, the larger this stat will be, although there's a bit of variance in each tier. It's a good general bit of information, but once you start adding magic, rare, and legendary items to the mix, you're going to have more things to consider.
The second thing you should note is the effect the item has on the three stats that are called out in the item's tooltip. These are life, damage, and protection.
- Life represents how much additional health the item will give you if you equip it. Clearly, the more life you have, the better off you are.
- Damage represents the damage change you'll experience when you equip this item. Higher damage means you're killing monsters faster, so this is frequently important.
- Protection represents how much overall armor you've got, and it decreases the damage you take, and it therefore makes surviving fights easier.
If you're just playing on normal, and aren't serious about maximizing your character, you can probably just look at these three numbers - they're highlighted in green if they're better, and red if they're worse. If some are green and others red, you'll have to decide if it's more important that a fight ends quickly, or that you're more likely to survive if things go south.
Watching these three numbers is likely enough to get you through the game on Normal. When you start finding gear with multiple enchantments, or you start shopping the auction house, you're going to want to be a bit more specific. Here's a few things to keep in mind:
Watch for items that increase your primary stat.
Your primary stat varies depending on your class, (Strength for Barbarians, Dexterity for Demon Hunters and Monks, and Intelligence for Wizards and Witch Doctors) but it's directly tied to how much damage you deal. Increases to this stat are generally taken into account in the comparative "damage" stat I talked about previously.
Note in the photo above that my damage is increased by equipping pants - this is because I am playing a monk in this screenshot, and the pants have +6 Dexterity. I'd have to decide if this damage boost is worth the loss of +6 vitality (= 60 life) or not.
The other stats will tend to give you secondary bonuses, but your primary stat is one of the most important things a piece of gear can give you.
Watch for useful enchantments.
What's useful is going to depend heavily on your character, but things like bonus experience or additional gold from enemies are almost universally good. Depending on how and what you're fighting, you might prefer a pair of boots with faster movement speed to get away from enemies, or perhaps something with high Vitality so that you can stay longer in a fight without needing healing.
Rarity isn't everything.
Although increasing rarity from magical (blue) to rare (yellow) and to legendary (orange) generally indicates better items, this is mainly because they are able to have more enchantments, or they have special/unique properties.
If the enchantments don't match your character or your build, they may not be better, even though they're more "special."