Back in “good old times” Intel named processor model numbers 8086, 80286, 80386, 80486, 80586 (ok, this one didn’t really exist – Pentium was introduced instead). Since they all were pretty much same architecture, at one point somebody just said x86 processors. To make things more interesting although x86 could refer to 80286 which is 16-bit processor, we use it in current days to refer to 32-bit architecture only. Intel itself referred to it as IA-32, but that name never really sounded as good.
Intel decided to make new 64-bit processor. Since IA-32 was heavy with compatibility baggage from as far as 8086, they made a clean cut. Everything on this processor was bigger, better and incompatible with old IA-32 architecture. Since server market needed 64-bit, some advancements were made there but market penetration wasn’t as good as Intel hopped. Problem was that native applications came in small numbers while compatibility with old IA-32 (or x86) instruction set was really slow. Architecture still lives on with Itanium processor.
AMD noticed problem and made own version of 64-bit processor. They just added some new 64-bit instructions to already existing x86. Solution was not all that clean as IA-64 but old applications worked at same speed (no emulation was needed) and new applications could address 64-bit space. That solution is known now as x86-64.
It took a while for Intel to see that his Itanium is going nowhere near consumer machines. When they finally took notice unbelievable thing happened – Intel used AMD64 instruction set. This made those two architectures same in sense of programming support. One doesn’t need to care whether he writes for Intel or AMD (not really true for early version of Pentiums since they lacked some instructions). Early name for Intel’s version was EM64T just in case you were interested.