Hundreds years ago the allchemist and later the chemists worked it out. By watching, doing experiments and found at the end some material, what cannot devided by chemical reaction anymore.(in greece language they called it atomous, where the word atom comes from).
Later in the last century in the 30ties, it was found also atoms can be more devided in smaller atoms and particles, with all the results of nuclear power, atomic bomb, etc.