This excerpt from an 'Ask the pilot' Q&A:
During flight none of [the] doors can be opened, for the simple reason that cabin pressure won't allow it. Think of an aircraft door as a drain plug, fixed in place by the interior pressure. With very few exceptions, aircraft doors open inward. Some retract upward into the ceiling; others swing outward or downward against the fuselage; but they all open inward first, and not even the most musclebound human will overcome the hundreds of pounds of pressure holding them shut. At a typical cruising altitude, as many as 8 pounds of pressure are pushing against every square inch of interior fuselage. That's 1,152 pounds of weight against each square foot of door. Flying at low altitudes, where cabin-pressure levels are lower, even a differential of 2 pounds per square inch is still more than anyone can displace -- even after six cups of coffee and the frustration that comes with sitting behind a shrieking infant for five hours.
For good measure, cabin doors are held secure by a series of electrical or mechanical latches, or both. So, while I wouldn't recommend it unless you enjoy being pummeled and placed in a chokehold by panicked passengers who don't know better, a person could conceivably sit there all day tugging on a door handle to his or her heart's content. The door is not going to open -- though you might get a red light flashing in the cockpit, causing the captain to spill his Diet Coke.