It turns out that there is significant relationship between the way the lobes are ground on the camshaft and the way the engine performs in different rpm (rotations per minute) ranges. To understand why this is the case, imagine that we are running an engine extremely slowly — at just 10 or 20 rpm, so it takes the piston seconds to complete a cycle.
It would be impossible to actually run a normal engine this slowly, but imagine that you could. You would want to grind the camshaft so that, just as the piston starts moving downward in the intake stroke, the intake valve would open.
The intake valves would close right as the piston bottoms out. Then the exhaust valve would open right as the piston bottoms out at the end of the combustion stroke and would close as the piston completes the exhaust stroke. That would work great for the engine as long as it ran at this very slow speed.
When you increase the rpm, however, this configuration for the camshaft does not work well. If the engine is running at 4,000 rpm, the valves are opening and closing 2,000 times every minute, or thirty to fourty times every second. When the intake valve opens right at the top of the intake stroke, it turns out that the piston has a lot of trouble getting the air moving into the cylinder in the short time available (a fraction of a second).
Therefore, at higher rpm ranges you want the intake valve to open prior to the intake stroke — actually back in the exhaust stroke — so that by the time the piston starts moving downward in the intake stroke, the valve is open and air moves freely into the cylinder during the entire intake stroke.
This is something of a simplification, but you get the idea. For maximum engine performance at low engine speeds, the valves need to open and close differently than they do at higher engine speeds. If you put in a good low-speed camshaft, it hurts the engine's performance at high speeds, and if you put in a good high-speed camshaft it hurts the engine's performance at low speeds (and in extreme cases can make it very hard to start the engine!).
VTEC (which stands for Variable Valve Timing and Lift Electronic Control) is an electronic and mechanical system in some Honda engines that allows the engine to effectively have two or more camshafts. As the engine moves into different rpm ranges, the engine's computer can activate alternate lobes on the camshaft and change the cam's timing [source: Motortrend].
In this way, the engine gets the best features of low-speed and high-speed camshafts in the same engine. At low RPMs, a cam profile with lower lift and shorter duration is used for better fuel efficienvy and smooth operation. As the engine's RPM increases, the system switched to a cam profile with higher lift and longer duration, unleashing more power and torque.