As widely known, everything is made out of molecules, and molecules are made out of a combination of nice little bits of matter called atoms. The vast variety of the possible combinations of these atoms - billions and billions - is only possible because there are many different types of atoms (90 of them occurring naturally and some 20 artificial ones), which for historical reasons are called elements.
It was not until the 1850s that scientists decided to take a closer look at the elements, their properties and their chemistry. By that time about 60 elements had been discovered, and the few known properties allowed only a loose ordering of the elements.
Then, in 1869, a Russian fellow named Dmitri I. Mendeleev came up with the decisive idea of how to sort the elements in a more logical way. His work finally led to the development of the periodic table of the elements, as it is known today.
By 1869, Mendeleev had assembled all available descriptions of the known elements (about 60 of them) and presented his results to the Russian Chemical Society. The publication of his work The Dependence Between the Properties of the Atomic Weights of the Elements marked the hey-day for element researchers all over the world. The strange new ordering of elements according to their properties and their atomic weight led to a series of conclusions. First, that certain properties occur periodically (hence the name), then that certain places in the table had to be left blank, for undiscovered elements. The properties of those undiscovered elements (the most prominent was to be Gallium), and of their compounds, could be predicted long before they were discovered. The discovery of Gallium in 1875, and the good agreement of the predictions with the actual properties, demonstrated the power of Mendeleev's table.
The science community of that time was dumbstruck at that Russian scientist and his new table, and today people still think it an extremely groovy piece of science.
A serious turmoil occurred in science at the beginning of the 20th Century. The discovery of atomic properties led to the quantum theory - a clever piece of science only understood by three or four persons on this planet, to paraphrase physicist Richard Feynman - and it revolutionised the way physicists and chemists thought about matter. The periodic table of the elements was reorganised to accommodate this new and ingenious theory, adopting the form it has today. The original sorting according to the molecular weight was dropped in favour of the more logical sorting according to the atomic number (which is the charge of the nucleus, or the amount of protons it is made of) and the groups were arranged according to their electronic configuration. Other minor changes were implemented, like the enumeration of the groups and periods.
The periodic table of the elements is not complete: every now and then a new element is synthesized and added to it. Nor is it in its final layout either - at the time of writing it is being maintained by IUPAC, the International Union of Pure and Applied Chemistry.