The basic difference between one and two gap techniques is that in a one gap technique, defensive linemen are expected to penetrate a particular gap and disrupt the backfield. The two gap defensive lineman is expected to take blockers head on and defend the gaps over each of their shoulders. Here's a simple diagram illustrating a basic 4-3 line, which typically utilizes the one gap technique, versus a 3-4 utilizing two gap technique:
Now, what makes the 3-4 defensive line so fun for defensive coordinators and frustrating for offenses is the fact that a 3-4 really clogs the middle. The biggest, strongest guys are actually assigned to defending the middle of your defense. In the one gap 4-3 defense, there's a checkerboard of linebacker, lineman, linebacker, lineman, etc. assigned to defend individual gaps. In the 4-3, play-side pursuit and backside containment are primary responsibilities of big lumbering defensive linemen. Remember the Orange Bowl where drop back passer Ricky Stanzi outran D. Morgan on a QB scramble?
The 3-4 solves this problem. Smaller, faster linebackers are defending the edges of the offensive formation rather than down linemen. Now, re-imagine that situation with Philip Wheeler chasing down Ricky Stanzi. Because they're stand up position players, their increased flexibility pre-snap and ability to react post-snap gives them a huge advantage in run defense over their 4-3 counterparts (three point stance defensive ends).
The two gap technique is not all that is utilized by 3-4's. Depending on the opposing offense's tendencies, down and distance situation, and defensive coordinator, you'll see one gap technique utilized by 3-4 defenses as well. One gap defenses are typically used in blitzes and/or definite pass rush situations. Some teams, like the Pittsburgh Steelers, rely almost entirely on the one gap 3-4 because they've got smaller, more athletic linemen and really good linebackers that can cover a lot of ground. They also love to blitz.
The best example of a two gap system in recent history was the Patriots featuring nose tackle Vince Wilfork. The two gap Patriots are bigger, longer linemen capable of consuming offensive linemen allowing the Patriot 2nd and 3rd tiers to make plays.
For more information on defensive line responsibilities in the 3-4, check out SBNation's Texas A&M Blog, I am the 12th Man. They have articles tailored specifically to the strongside defensive end, nose tackle, and weakside defensive end.