Objects attract each other whenever they have mass and energy, which cause curvatures in the space-time continuum.
Imagine the universe as a trampoline. The surface of the trampoline is space-time continuum.
Now, if you put an object on the trampoline, you will see dents in the surface, i.e. the surface gets curved due to the mass of the object. Put two objects, and you have two curves. You will see that if the trampoline is perfectly horizontal, and the objects are well spaced, they wont move. But bring a objects a bit closer, until their curves coincide. At this point, you'll see the masses will rush towards each other.
In other words, the masses accelerate towards each other. The curve caused by one mass in the surface of the trampoline causes the other mass to "fall-in" towards it, and since both of them have mass, whether equal or not, they each cause the other to fall-in towards them.
The space-time continuum of the universe acts in a similar fashion. All masses and energies curve the space-time continuum around them according to their magnitude. Since the space-time continuum is virtually infinitely long, the curves are also infinitely long, but is most at the center of the mass, or energy, and flattens gradually as you move further away. When two masses are close enough for their curvatures to coincide at more-curved regions, they attract each other with a force great enough to cause each other to fall-in.
Gravity exists because it is built-in to the very fabric of space-time. There is no better explanation at this time. In particle physics, it is said that the interaction of Higgs-field with other particles generates mass. Masses emit a hypothesized particle called graviton, which interact with graviton from other masses, creating a field, and hence a force, much like the magnetic field around magnets. In fact, the four fundamental forces of nature are the gravitational force, electromagnetic force, the weak interaction force and the strong interaction force.