The K6 came out in 1997 and competed with the Pentium II. Later the K6-2 (and 3) competed with the Pentium III. The AMD CPUs were about on par in integer performance, but got left in the dust when it came to floating point performance. AMD didn't pull ahead of Intel until the Athlon, which was partially due to Intel's poor design for the Pentium 4 but also because the Athlon was a great CPU itself.
One thing that helped AMD out in the late 90s was 3DNow!, which was introduced in the K6-2 and that quite a few games supported. It really made a noticeable difference if you had decent 3D hardware. At the time, I was running a K6-2 400MHz with dual Voodoo 2 cards in SLI, piped through a Matrox Millennium II. I could run Unreal at 1024x768 with maxed out settings. I remember my roommate and friends being quite envious, heh.