How and why a magnetic field is produced? It is in general known to everybody that magnets attract some particular (when kept in a particular region) substances and they also attract/repel each other, due to their magnetic field.
I have got two conceptual :

Why is a magnetic field produced at all?
What is inside magnetic substances (that creates the magnetic field)?

 A: 
Why is a magnetic material magnetic?


*

*All electrons have a magnetic moment associated with them, that is just a law of nature that we have to accept..... Even though I detail in basic terms, the math relationship between spin and mangnetic moment, which I have taken from Wikipedia Magnetic Moment  , you will still need to accept the notion of magnetic fields as an aspect of nature that currently has no deeper explanation.  Although some of the other answers deal far better than I could with explaining  electrons in an electric field as a source of magnetism,   I wanted to try and answer your question in light of the importance, imo,  of magnetic moments and domains in describing magnetism.


The spin magnetic moment is intrinsic for an electron. It is:

$${\displaystyle {\boldsymbol {\mu }}_{\text{s}}=-g_{\text{s}}\mu _{\text{B}}{\frac {\mathbf {S} }{\hbar }}.}$$

Here S is the electron spin angular momentum. The spin g-factor is approximately two: $g_s ≈ 2$. The magnetic moment of an electron is approximately twice what it should be in classical mechanics. The factor of two implies that the electron appears to be twice as effective in producing a magnetic moment as the corresponding classical charged body.
The spin magnetic dipole moment is approximately one $μB$ because $g ≈ 2$ and the electron is a spin one-half particle: $S = ħ/2$.

$${\displaystyle \mu _{\text{S}}\approx 2{\frac {e\hbar }{2m_{\text{e}}}}{\frac {\frac {\hbar }{2}}{\hbar }}=\mu _{\text{B}}.} $$

The z-component of the electron magnetic moment is:

$${\displaystyle ({\boldsymbol {\mu }}_{\text{s}})_{z}=-g_{\text{s}}\mu _{\text{B}}m_{\text{s}}}$$

where $m_s$ is the spin quantum number. Note that $μ$ is a negative constant multiplied by the spin, so the magnetic moment is antiparallel to the spin angular momentum.
The spin g-factor $g_s = 2$ comes from the Dirac equation, a fundamental equation connecting the electron's spin with its electromagnetic properties. Reduction of the Dirac equation for an electron in a magnetic field to its non-relativistic limit yields the Schrödinger equation with a correction term which takes account of the interaction of the electron's intrinsic magnetic moment with the magnetic field giving the correct energy.
For the electron spin, the most accurate value for the spin g-factor has been experimentally determined to have the value

$2.00231930419922 ± (1.5 × 10^{−12}).$

Note that it is only two thousandths larger than the value from Dirac equation. The small correction is known as the anomalous magnetic dipole moment of the electron; it arises from the electron's interaction with virtual photons in quantum electrodynamics. In fact, one famous triumph of the Quantum Electrodynamics theory is the accurate prediction of the electron g-factor. The most accurate value for the electron magnetic moment is

$(−928.476377±0.000023)×10^{−26} J⋅T^{−1}$.

From Magnetic Domains Wikipedia

Moving domain walls in a grain of silicon steel caused by an increasing external magnetic field in the "downward" direction, observed in a Kerr microscope. White areas are domains with magnetization directed up, dark areas are domains with magnetization directed down.



*Some materials, such as iron, allow these electrons to clump in organised domains, rather than randomly, which lets iron's molecular structure act to enhance the magnetic effect, so all these magnetic moments are aligned in the same direction.


*The domains have to occupy a relatively large volume of the material, depending on their strength.  Aluminum is an example of a metal in which the domains exist but are not as organized or as  widespread as iron.


*Another example of how important the magnetic domains are, is the fact that almost all magnetic materials are solids. In fact melting a solid will normally disrupt its magnetic field, again because domains are disrupted and again iron is special, as the liquid core of the Earth still makes a compass needle move.
A: Mostly responsible for a magnetic field are electrons.  
Electrons magnetic dipole moment and unpaired electrons
In atom only two electrons can share the same the same quantum state except their intrinsic magnetic dipole moment. This moments have to be oriented in opposite directions. Thus the opposite directions makes the atom more or less magnetically neutral. But there exist atoms with unpaired electrons and this atoms have a remarkable magnetic moment. (To draw the full picture, if one influent atoms strongly the magnetic dipole moments of all subatomic particles will be observable.)
Alignment of the electrons magnetic fields
From a remarkable magnetic dipole moments in atomaric level it couldn't concluded that in the macroscopic level a magnetic field would exist. There are some natural minerals there the magnetic dipole moments of the involved electrons are aligned and thus the act as magnets. To make a more strong magnet the powder of magnetic materials is pressed and by this influenced with an external magnetic field which aligns the powders magnetic fields to a common field.
As you can see, responsible for the macroscopic phenomenon of magnetic field is the intrinsic (under all circumstancess existing) property of magnetic dipole moment of the involved particles.
A: Magnetic force is created by moving electric charges.
In the case of electric charge flowing along a wire, the magnetic field surrounds the wire and is perpendicular to the direction of electric flow along the wire.
In the case of ferromagnetic material (the magnets you may have played with), the magnetic field arises from the spin of electrons aligning inside the molecules of the material. The north and south poles of each molecule align with other molecules in the material, creating a magnetic field which acts on electric charges outside the magnetized material.  
A: To put it very simply, a magnetic field is produced when charged particles move. This is why we can make electromagnets: the moving electrons generate a magnetic field.
So what makes magnet... magnetic even without current? Well, the electrons in the material are moving in the atom, and that generates a magnetic field. Furthermore, electrons have an intrinsic magnetic moment which we call spin. These effects contribute to the magnetic field generated by an atom.
But if you notice all materials contain these moving electrons, but not all are magnetic. The reason why this is the case is more complicated than what I am presenting, but it is a helpful picture to have in mind. 
In atoms, electrons fill the atomic orbitals in opposite pairs, so in some cases the intrinsic magnetic moment from spins cancel out. Further, the movement of electrons are described by their angular momentum, which in some cases cancel out due to how the orbitals are filled (see Hund's rule).
The description thus far is based on atoms, but in solids these atoms have neighbours, and these play a role in the amount of angular momentum that contributes to magnetic field. The contribution from electron movement (angular momentum) can quenched due to the non radial potential of electric field, and thus diminishes magnetic property. I would add that the atom description works well for well for solid rare earth metals (lanthanides), as the 4f shells (which have unpaired electrons) are shielded from effects from neighboring atoms by their 5s & 5p shells, so the 4f electrons experience a radial electric field.
But all these effects are not able to describe the iron or steel permanent magnets we know. What happens in permanent magnets (made of ferromagnetic materials) is quite special: ferromagnetic material have domains, which are regions where all the atoms have magnetic moment pointing in a particular direction. In a unmagnetised iron for example, these domains are randomly oriented, so the effects cancel out and it does not have magnetic property. But if you put it in a magnetic field, these domains align up, and thus contributes to the applied magnetic field, making the field stronger. If you stroke it with a permanent magnet, you can make these domains point more or less in the same direction, and the material becomes a permanent magnet.
A: 
We all have seen or played with a magnet.It is in general known to everybody that magnet attract particular substance kept in a certain area and this certain area is magnetic field.Now the question teasing my mind is that why a magnetic field produced???What is inside magnetic substances (I mean is there a kind of core which vibrates to produce magnetic field,or may be something else).

A magnetic field is produced by moving charged particles, such as a current in a wire. Permanent magnets consist of materials in which the electrons moving around the atomic nucleus combine to create a magnetic field without a current.

Finally,The question i m asking is that why a magnetic field is produced and what is so special with magnetic substances???

I don't know the answer to this part of your question, but the magnetic substances have a property called "ferromagnetism", where the "ferro" is another word for "iron". There is an explanation on Wikipedia here, but it seems pretty advanced.
A: As I understood it there are a couple of good ferromagnetic materials like cobalt nickel and iron. In those materials there are a couple of unpaired electrons in the outer shell in contrary to most other elements which are equalling each other fields out. 
Because those ferromagnetic elements has domains, a group of electrons wiht their upaired electrons, they a aligned very well when influenced by another magnetic.
Now for example in steel , there are also carbon atoms prohibiting those domains to turn back in a disordered range. So steel, ones magnetised is a good one.
