How gravitational pull is formed in earth and by which object?

It is the mass of the earth itself that generates the gravity of earth. Every bit of matter in the earth adds to the gravitational pull that every object on the earth feels. In turn, the masses of our bodies have their own gravity, and our bodies and the earth exert a mutual pull. Earth is more massive, so it wins (we move toward earth; earth doesn't move toward us). For very large objects like the moon, the mutual pull is a little more cooperative. Earth and moon actually both orbit around a mutual point. If the moon and earth were the same mass, they would each orbit around a point half-way between them. They would do a kind of spiral dance together as they orbit around the sun.