Understanding the concepts of temperature and thermal energy means reconciling your day-to-day experiences with what is happening at a tiny scale. All matter is made of particles—atoms and molecules—that are in constant motion. These particles have kinetic energy, the energy of motion.
Consider these two scenarios:
If you compare two glasses with the same amount of water but each at a different temperature, the particles in the warmer water are moving faster than the particles in the cooler water, and the glass of warmer water has more thermal energy than the glass of cooler water.
If you compare two glasses with different amounts of water but both at the same temperature, the average kinetic energy of the particles is the same in both containers, but the glass with more water has more thermal energy.