How is it possible that particles maintain continual motion?

The kinetic theory of matter (particle theory) states that: "all matter consists of many, very small particles which are constantly moving or in a continual state of motion".

Given the 1st law of thermodynamics, how is this possible? That is, how are particles of a substance in the solid phase able to continually vibrate. And how are particles of a substance in the gas phase able to maintain random motion?

The kinetic theory also states that the collisions of the particles with walls are elastic, therefore there is no kinetic energy lost. Regarding the first law, it only says how energy can be exchanged. The fact that the molecules are constantly moving is not in contradiction with first law.

All particles are always moving because they have thermal energy which makes them vibrate and randomly move around. We could say that when particles get warmer then they vibrate with a higher frequency and move a lot faster. When they get cooler, then the particles move and vibrate slower. There is the theory that if a particle is at $-273\ \mathrm{°C}$ or $0\ \mathrm{K}$, then it would be at a stationary position and would not vibrate at all. But there is no evidence of such case yet.

By the way, that thermal energy that all particles contain for different amounts is believed to come from the big bang.