Physics of a burning log of firewood

According to my knowledge, heat is nothing but the result of the vibrations of atoms and molecules. I guess this mean that in heating up a gas or liquid, we are increasing the rate at which the container of this gas or liquid vibrates, thereby imparting to the molecules a certain amount of energy.

How would this work in case of a burning log in the fireplace? Is it vibrating and thus heating up the molecules in the room? Or is it releasing highly energetic photons that do the required bombarding? What exactly is happening when we light a fire?

-

The key thing to know about burning a log of wood (or indeed anything) is that it isn't the wood that is burning. The combustion occurs in gases released by the wood as they react with the atmosphere. That's why you need a fair bit of heat to get wood burning in the first place. If you watched the combustion closely you'd see gas molecules given off by the hot wood reacting with oxygen molecules in the air. The reaction produces energy and the energy is carried away as increased velocity of the reaction produces (mainly CO$_2$ and water).

So as a result of combustion we now have reaction product molecules moving in random directions at very high speed, and of course this is exactly what we mean by a hot gas. There are three things that can happen to our fast moving gas molecules:

1. they bash into the wood and excite vibrations in the surface of the wood, in other words they heat the wood by transfering their kinetic energy to the atoms/molecules in the wood. This heating is required for the wood to continue giving off gases and maintaining the flame.

2. the fast moving reaction products collide with other air molecules and transfer energy to them, so they heat up the air around the flame. This, along with a few helpful convention currents, is the main mechanism for heating the air in the room and ultimately you, the walls of the room etc.

3. the fast moving reaction products collide with particles of carbon in the flame and heat them up to the point where they glow. This is what gives the yellow colour we associate with flames. A clean flame e.g. hydrogen burning in oxygen is virtually colourless.

You might point out I haven't mentioned the radiant heat that you can feel on your hands and face as you face the fire. The radient heat isn't coming from the flame, or at least only a very small part comes directly from the flame. The heat is coming from the wood, grate, fireplace and anything solid near the flame, because those solids have been heated by the fast moving reaction product molecules. This is the black body radiation mentioned by Luboš Motl in his answer (which I can't improve on so I'm not going to try!). It might be worth adding that black body radiation arises because the particles, electrons and nuclei, in a solid are charged, so as they vibrate they emit electromagnetic radiation. This is how mechanical vibrations get converted in electromagnetic (infra-red) waves.

-

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.

-

There will be heat transferred from the hot contents of the fireplace to the cool room by three mechanisms of heat transfer: conduction, radiation, and convection.

I think only the first two have been mentioned so far: conduction and radiation.

The majority of heating of the room by the fire may be accomplish by warm air moving and mixing with cooler air in the room.

The best fireplaces are built with ducts that wrap around the hot sides of the firebox to take maximum advantage of this.

-

Mostly your skin directly is receiving radiated photons which is perceived as heat.

-