Outer core: It is located beneath mantle. The outer core is composed of the melted metals like nickel and iron.
Inner core: It is composed of an iron–nickel alloy and some light elements.
Thus core is mostly constituted by iron. This fact can be known by the measurement of densities of various layers of earth. At the core there is a higher density and this density could only be possible by higher amounts of iron present in the core.