the mute 1 has it pretty much nailed except for a few things. first they dont always kick in at 5000rpms. in fact there are 2 stages of vtec. the first stage in very low rpms (depending on the engine(the d16y8 starts at 2800)) where it switches from only using one of the intake valves per cylender to using both. the second stage is what he talked about (plus the valves open wider) but depends on the engine to when the cylenoid adjusts the cam timing and postition. (the d16z6 starts at 5600). Also it is much less expensive to use the head and cylenoid of a vtec engine on a non-vtec block, such as the d16y7 (or the b16a1 for you dohc fans out there). they often call a swap with a d16y7 block and a d16z6 head a mini-me swap. Ecu tuning can lower the 2nd stage kick-in time.
Honda produced engines with v-tec technology to combine power and efficiency.