The atom is a basic unit of matter that consists of a dense central nucleus surrounded by a cloud of negatively charged electrons. The atomic nucleus contains a mix of positively charged protons and electrically neutral neutrons (except in the case of hydrogen-1, which is the only stable nuclide with no neutrons). The electrons of an atom are bound to the nucleus by the electromagnetic force. We have a detailed (and accurate) model of the atom now , but it took a long time to come up with the correct answer.
People have long speculated about the structure of matter and the existence of atoms. The earliest significant ideas to survive are from the ancient Greeks in the fifth century BC, especially from the philosophers Leucippus and Democritus. (There is some evidence that philosophers in both India and China made similar speculations at about the same time. ) They considered the question of whether a substance can be divided without limit into ever smaller pieces. There are only a few possible answers to this question. One is that infinitesimally small subdivision is possible. Another is what Democritus in particular believed -- that there is a smallest unit that cannot be further subdivided. Democritus called this the atom. We now know that atoms themselves can be subdivided, but their identity is destroyed in the process, so the Greeks were correct in a respect. The Greeks also felt that atoms were in constant motion, another correct notion.
The Greeks and others speculated about the properties of atoms, proposing that only a few types existed and that all matter was formed as various combinations of these types. The famous proposal that the basic elements were earth, air, fire, and water was brilliant but incorrect. The Greeks had identified the most common examples of the four states of matter (solid, gas, plasma, and liquid) rather than the basic chemical elements. More than 2000 years passed before observations could be made with equipment capable of revealing the true nature of atoms.
Over the centuries, discoveries were made regarding the properties of substances and their chemical reactions. Certain systematic features were recognized, but similarities between common and rare elements resulted in efforts to transmute them (lead into gold, in particular) for financial gain. Secrecy was commonplace. Alchemists discovered and rediscovered many facts but did not make them broadly available. As the Middle Ages ended, the practice of alchemy gradually faded, and the science of chemistry arose. It was no longer possible, nor considered desirable, to keep discoveries secret. Collective knowledge grew, and by the beginning of the 19th century, an important fact was well established: the masses of reactants in specific chemical reactions always have a particular mass ratio. This is very strong indirect evidence that there are basic units (atoms and molecules) that have these same mass ratios. English chemist John Dalton (1766-1844) did much of this work, with significant contributions by the Italian physicist Amedeo Avogadro (1776-1856). It was Avogadro who developed the idea of a fixed number of atoms and molecules in a mole. This special number is called Avogadro's number in his honor (6.022·1023).
Dalton believed that matter is composed of discrete units called atoms, as opposed to the obsolete notion that matter could be divided into any arbitrarily small quantity. He also believed that atoms are the indivisible, ultimate particles of matter. However, this belief was overturned near the end of the 19th century by Thomson, with his discovery of electrons.