The present investigation is concerned with the study of pulsed second-harmonic generation under conditions of phase and group velocity mismatch, and generally low conversion efficiencies and pump intensities. In positive-index, nonmetallic materials, we generally find qualitative agreement with previous reports regarding the presence of a double-peaked second harmonic signal, which comprises a pulse that walks off and propagates at the nominal group velocity one expects at the second-harmonic frequency, and a second pulse that is ``captured'' and propagates under the pump pulse. We find that the origin of the double-peaked structure resides in a phase-locking mechanism that characterizes not only second-harmonic generation, but also ${\ensuremath{\chi}}^{(3)}$ processes and third-harmonic generation. The phase-locking mechanism that we describe occurs for arbitrarily small pump intensities, and so it is not a soliton effect, which usually relies on a threshold mechanism, although multicolor solitons display similar phase locking characteristics. Thus, in second harmonic generation a phase-matched component is always generated, even under conditions of material phase mismatch: This component is anomalous, because the material does not allow energy exchange between the pump and the second-harmonic beam. On the other hand, if the material is phase matched, phase locking and phase matching are indistinguishable, and the conversion process becomes efficient. We also report a similar phase-locking phenomenon in negative index materials. A spectral analysis of the pump and the generated signals reveals that the phase-locking phenomenon causes the forward moving, phase-locked second-harmonic pulse to experience the same negative index as the pump pulse, even though the index of refraction at the second-harmonic frequency is positive. Our analysis further shows that the reflected second-harmonic pulse generated at the interface and the forward-moving, phase-locked pulse appear to be part of the same pulse initially generated at the surface, part of which is immediately back-reflected, while the rest becomes trapped and dragged along by the pump pulse. These pulses thus constitute twin pulses generated at the interface, having the same negative wave vector, but propagating in opposite directions. Almost any break of the longitudinal symmetry, even an exceedingly small ${\ensuremath{\chi}}^{(2)}$ discontinuity, releases the trapped pulse which then propagates in the backward direction. These dynamics are indicative of very rich and intricate interactions that characterize ultrashort pulse propagation phenomena.