How a piece of metal put in the oven reaching a constant temperature of 3000 K fit the model of a hole in a cavity? The common and practical model for a blackbody is a hole inside a cavity, and even stars can be made to fit into this model. My question is how to make anything else like a piece of metal at some constant temperature fit into this model?
 A: One has to distinguish between black body and black body radiation (see, e.g., the discussion in Black body vs. Thermal radiation thread.) The latter is radiation in thermal equilibrium, which, in modern physics, can be derived without recourse to the concept of black body - e.g., simply by starting from the Boltzmann distribution of a photon gas.
Black body is an object that absorbs all the radiation incident on it and then re-emits it - thus, it finds itself in equilibrium with the surrounding radiation, which provides another way of deriving black body radiation spectrum.
A piece of metal heated to 3000K is obviously not in equilibrium with its environment, and hence it is not a black body. It can be however viewed as a body in internal thermal equilibrium, and the radiation wandering inside (emitted by some atoms and absorbed and reemitted by the other) is in thermal equilibrium, i.e., it can be described as black body radiation. The radiation emitted by such an object (during a short observation time) constitutes only a small fraction of the radiation energy stored inside. Of course, if we look at this object for a long enough time, the quasi-equilibrium description for the radiation in it does not hold - the object will gradually lose more and more energy, eventually coming to equilibrium with its surroundings.
A more interesting case is Sun with internal sources of energy - see How does radiation become black-body radiation? for more discussion.
A: It fits the model of a cavity with a small hole by virtue of the fact that the majority of photons emitted by the metal are absorbed by the metal. It is only the photons emitted at the visible surface that escape. This ensures that the radiation is "processed" and comes into equilibrium at the same temperature as the metal. We say that the metal is "optically thick" to its own radiation or any radiation incident upon it. In the same way, most photons emitted by the walls of a cavity do not escape through a small hole, they are re-absorbed by the walls and any radiation incident upon the hole does not re-emerge.
This is also the reason a star (or at least some types of star) emits radiation that approximates to that emerging from a small hole into a hot cavity. In both cases (metal or star), the spectrum more closely resembles that of a blackbody if the emergent radiation comes from a region that is close to isothermal; this requires the absorption to be roughly wavelength-independent.
