What causes Earth's gravity? 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.