How do Black Bodies Absorb and Emit Radiation? I have learnt how the gases of elements are able to absorb only certain wavelengths of EM radiation corresponding to the energy transitions between energy levels of orbitals. Furthermore, these excited electrons are able to fall back to lower energy orbitals to release certain wavelengths of radiation.  
I have also learnt that perfect black bodies absorb all wavelengths of radiation and emits radiation and how hot, glowing solids and liquids can be modelled as black bodies. However I don't understand how black bodies are able to absorb all wavelengths of EM radiation. 
For example, I can't understand how a piece of hot iron (which can be modelled as a black body) can absorb every single wavelength of EM radiation that falls upon it if only certain energy transitions are allowed by electrons. I understand that there are more transitions possible than just electronic transitions, such as vibrational and rotational transitions. However I don't believe that this is able to result in all wavelengths of EM radiation to be absorbed.
Further, for the same reason I am not sure how black bodies are able to produce a continuous spectrum (emit all wavelengths of light) if only certain energy transitions are allowed.
Note: I am aware a similiar question has already been asked: How black body absorbs light?, however it didn't answer my question. 
 A: If the absorptivity of a medium really was discrete, then there would be no way it could emit blackbody radiation. 
The defining characteristic of a blackbody is that it absorbs light of all frequencies that are incident upon it (and that it is in thermal equilibrium). There is a close relationship (a direct proportionality) between the Einstein absorption and emission coefficients for atomic, ionic and molecular processes which ensures this.
So whilst you can imagine hypothetical materials with discrete absorption spectra caused by "delta function" spectral lines, you cannot also hypothesise that these would emit blackbody radiation - they would not.
In practice the absorption coefficients of real materials are not delta functions at fixed frequencies. Electronic transitions have finite widths - there is natural broadening, doppler broadening, pressure broadening. Real materials also have continuous absorption coefficients caused by photoionization, free-free absorption, inelastic scattering etc. These effects cause the absorption coefficient to be non-zero at practically all frequencies. In those circumstances, to get a continuum blackbody we simply need to arrange to have enough material present that it is optically thick (that is, it has an optical depth much larger than unity) at all relevant frequencies. If that is so, and the material is in thermal equilibrium (energy levels populated according to Boltzmann factors etc.) then it will emit what is close-to-blackbody radiation.
A: As you said, vibrational and rotational transitions are also possible, and I believe that the energy differences involved there are enough to have a quasi-continuous absorption spectrum in most real-life scenarios (of course, in real life you will never have perfect absorption at all wavelengths).
In the following picture, you can see two energy wells corresponding to different electronic levels. As you can see, every well contains a great number of vibrational levels and an even greater number of rotational levels (only shown at the bottom of one of the wells for clarity)

This fact greatly increases the number of frequencies that a material can absorb and can give an almost continuous absorption spectrum in many real-life situations. For example, in the following picture you can see the roto-vibrational spectrum of carbon monoxide. As you can see, it is not so different from a continuous spectrum.

Also notice that, as Rob Jeffries pointed out, real-life spectral lines will extend over a range of frequencies (you can see it also in the previous picture: the lines have finite width,i.e. they are not really lines). See enter link description here for more details.
Having said this, we have to remember that a black body is only an idealization. There have been attempts to built nearly-ideal black bodies. Here one of such attempts is described. They have built a "forest" of closely-spaced carbon nanotubes. The single nanotube doesn't have perfect absorbance: it is their structure that is fundamental here. Loosely speaking, incident radiation is partly absorbed and partly reflected within the forest. The reflected radiation propagates in the forest and in every interaction is partly absorbed, until almost all radiation is absorbed. The result is this emissivity (red line in the picture):

Notice that a perfect black body would have unitary emissivity.
Update
To answer your question

There is only a limited number of high energy transitions as there is only a limited number of electronic energy levels. So how would the spectrum for visible, UV, x-rays and gamma rays be continuous?

Actually the number of electronic energy levels is infinite. As you go to higher energy level, they become more and more closely spaced until they form a continuum (see picture below). If you increase the energy of the incident radiation, at a certain point you will ionize the molecule, that is to say you will rip the electron off. So we could say that the limit is given by the ionization energy, the energy needed to ionize the atom. 

Helium has the highest ionization energy with 25 eV: since that means ultraviolet radiation, it would seem that radiation above that energy cannot be absorbed. 
But that is not true. The point is that there are numerous other (more extreme) processes apart from electronic transitions in which radiation can be absorbed: Compton effect, photoelectric effect, pair production...
In the following picture you can see the contribution of the various effects.

Hope this answers your question :-)
A: A black-body can absorb all the radiation falling on it(light at all wavelengths) and appears black when cold. When it gets heated it can emit radiation at all wavelengths like a heated piece of metal. The hotter it gets the higher the photon frequency (energy) and so a shorter wavelength. Hotter objects emit more total radiation per unit surface area. This is not the same as photon absorption and emission of normal electron arrangements that fall within certain energy levels. As a black body heats up the electrons get more and more excited like a light bulb. At first red light and then the full spectrum. As all the colors mix it goes from red to orange to white. You don't see the greens and blues because they mix.    
