Both. At temperature $T$ (absolute temperature in kelvins), every "degree of freedom" carries some amount of energy equal to $kT/2$ in average. By a degree of freedom, one means either one Cartesian coordinate of one atom – or another particle that is effective "free" – or one angular coordinate for a rotating object whose rotations can actually be distinguished from the rest.
For gases, this energy is stored mostly in the kinetic energy of the individual molecules (or atoms). The hotter the gas is, the more they move, $mv^2/2\sim kT$ in average. For liquids, it's similar except that the molecules are constantly hitting others. For solids, the energy is stored in vibrations of atoms or molecules, but they mostly vibrate in the very vicinity of prescribed positions only, like harmonic oscillators of a sort.
At the same moment, at tempeature $T$, all objects – solids, liquids, gases etc. – also radiate (a large number of) photons and any other radiation corresponding to this temperature. Well, that's true for black bodies: the emissivity may be affected by a frequency-dependent function for "colorful" or "shining" or "reflective" bodies.
Whenever the energy is stored only in one of the vibrations or radiation of the kinds listed above (or any other forms of energy that a system may have), it means that the system isn't in thermal equilibrium but it will do everything it can to achieve the equilibrium, so the energy (heat) will be drifting from the degrees of freedom that carry greater energy than others, to these others.