Why Earth is like a magnet? how can earth attract any object irrespective of what it is made of? What is the reason behind Celestial Body's gravity? i.e Sun,Jupiter,Moon etc.
Any object's mass warps the space around it towards the center of the object which causes other objects to 'fall' in towards that object or towards each other. Bigger objects have more mass therefore they warp space to higher degree causing more gravity. It doesn't matter what a substance is made of as long as it has mass. If it has mass it causes gravity.
Since you're wanting to know why mass causes gravity (from your question marked as duplicate https://astronomy.stackexchange.com/questions/1988/how-does-an-astronomical-objects-mass-make-it-attract-the-things-around-it) I'll give a little better of an explanation. Since the discovery of Higgs particle last year--which I'm sure you've heard about--if not here's a link http://en.wikipedia.org/wiki/Higgs_boson, we've essentially confirmed that mass is caused by a fundamental particle called the Higgs boson. I think this article may actually answer your question http://physics.aps.org/articles/v6/111. I'm a mathematician not a physicist so I'm not an expert in this area but hopefully the other article can help answer your question better.