Everything that has mass has gravity; put another way, everything that has mass attracts everything else that has mass. Mass is the amount of matter contained in an object; it's also what gives that object inertia, the tendency of matter to remain at rest if at rest, or, if moving, to keep moving in the same direction at the same speed. The greater an object's mass, the more gravitational force it exerts.
Why does the Earth have more gravitational force than the moon or some other planet?
So, to begin answering your question, Earth has a greater gravitational pull than the moon simply because the Earth is more massive. The moon's gravitational pull also affects Earth, though; the rising and falling of the tides are an effect of the moon's gravity.
But that isn't the end of the story. How much gravitational force one object exerts on another is related to the mass of the two objects and the distance between them. An object's gravitational pull affects an object that's close to it more than an object that's farther away.
Jupiter has a much greater mass than Earth, and therefore has a greater gravitational pull, but because our moon is so much closer to Earth than it is to Jupiter, the Earth's gravitational pull exerts a greater force on the moon than Jupiter does. That's why the moon isn't pulled out of Earth's orbit by the gravity of larger planets or by the sun.