In the beginning, scientists knew there were elements that acted out on certain things. But of course the number of those elements were limited. It all started with Aristotle's theory, saying that there were "elements": Fire, Earth, Water, Air. But by 1817, 52 elements were discovered, and scientists were already starting to organize them, or more so, "group" them. In 1857, a good man named William Odling organized the found elements of that time into 13 groups based on their similarities in physical and chemical properties.
The 19th Century was a breakthrough for the Periodic Table. The Law of Octaves was created by John Newlands, stating that chemical elements are arranged according to their atomic weight. He was one of the first scientists who detected a trend or pattern in the elements discovered. This was quite the breakthrough, however Newland's method didn't let scientist predict elements, and he made things ambiguous; he couldn't make his mind up and kept on changing the way he ordered things. Sounds like a confused, smart guy, eh?
Now, Newland must've been so aggravated when Mendeleev discovered something even more greater than he did. It was one of those "I knew that!" moments for him. Dimitri Mendeleev discovered that when you listed the elements in order according to their mass, certain features of elements recurred. Thus, he decided to organize the elements in periods (rows) and groups/families (columns). He even was smart enough to leave gaps in between elements for elements that would be discovered later on. This allowed scientists to predict elements according to their family and their similar properties.
In modern day chemistry society, (aka now), the elements are arranged according to their atomic number as opposed to their atomic mass.
But seriously, you students. Imagine if none of these scientist never made any of these discoveries. We wouldn't be sitting here doing chemistry. Dang. LOL jk.
.....Well that's one way to look at it.