In Iron Man, there was a heavy physical suit they sometimes used, but the bulk of the footage was CGI, as the proportions of the Iron Man suit aren't that of a human's. Wikipedia mentions
sometimes, Downey would only wear the helmet, sleeves and chest of the costume over a motion capture suit.
[The Iron Man 2 suit] was only a half suit -- from the waist up. I think we weighed it in at about 13 pounds. The [suit in] the first film was about 85 pounds.
In Iron Man 2, they built a light partial suit that a person could fit in. If you compare Iron Man in any of the action scenes against the suit that Stark is wearing during his party for example, you'll see that the party suit is much larger and bulkier. This is because he's wearing the physical suit during the party scenes (they then transition back to the CGI for the fight afterwards).
As you can see, the arms and legs are then added via computer later on. However, they leave the thicker real torso for these scenes instead of making him thin. After they've put it through computer movie magic, it looks like this:
For one of the all-CGI suits, see how it's much thinner in the waist:
From the same article:
The upper suit is real for most of those shots.
For the shots where it isn't real, they also had this:
Update for The Avengers:
io9.com recently interviewed some of the folks at ILM who worked on the special effects for The Avengers:
Robert Downey Jr. basically never wears the full Iron Man suit any more.
That suit is really, really uncomfortable and pinchy, says Chu. And whenever you see Iron Man in his armor, that's a CG rendering of Iron Man, or a stunt man named Clay. After the first Iron Man movie, says Chu, Downey Jr. saw what they could do with CG versions of the suit. "He knew he did not have to wear as much of the suit, and that would make him a lot more comfortable." There's a partial version called the "football suit" that he wears in a couple scenes, like at the end when he's laying on the ground.
Although, there are still occasions where he wears a full version of the suit: