The haphazard motion of particles of matter is called brownian
motion.
Brownian motion is the random movement of particles suspended in a fluid as they collide with other particles. A common example is the movement of pollen grains in water. You can observe Brownian motion in action by observing the random movement of tiny particles under a microscope.
Around 2,500 years ago this Greek dude name Democritus was sitting around just thinking. He was thinking about cutting stuff up and came up with the idea that there must be a point where you could no longer cut something any smaller. He named the atom after the Greek word atomos, which means that which can't be split. The cool part is that he was right, well 90% right.