Our understanding of the atomic model has developed over time. The idea of the atom came from ancient Greece.
The ancient Greek philosopher Democritus believed that objects can be cut into smaller pieces, however, the smallest piece is uncuttable. So, he believed that all matter is made of tiny indivisible pieces of that type of matter.
Before the electron had been discovered, John Dalton believed that atoms were tiny solid balls that could not be divided into smaller components. This is the Dalton model.
Dalton believed that for a specific element, all atoms would be identical. He also believed that during chemical reactions, the atoms of the reactants would rearrange to form new substances.
In 1897, J.J. Thomson discovered the electron. As a result, he proposed the idea that atoms have a positive charge with negatively charged electrons inside. This resembles a plum pudding, so it was called the plum pudding model.
As the electrons have a negative charge, it was assumed that the rest of the atom had a positive charge, making the atom neutral overall. So, the atom is a ball of positive charge (the dough), with negatively charged electrons embedded in it (the plums).
Electrons were known to be smaller than atoms, so it was reasoned that they were embedded somewhere inside the atom.