The releationship between mass and energy is contained only in relativity theory, which is considered rather advanced physics.
In short, the more energy something has, the more mass it is. This goes for gases at higher temperatures, spacecraft at higher speeds, and so on.
The equation of merit is:
E = \sqrt{m c^2 + p^2 c^4}
Where E is energy, m is rest-mass (the mass something will appear to have when it's at rest with you), p is the momentum the object has, from your viewpoint, and c is the speed of light.
In other words, just as you already know, energy can be manifested by motion. A bullet flying at you is a lot more frightening than one laying on the ground. The only thing that relativity adds is the assertion that mass itself is also a form of energy.
- Warren