If I understand your question correctly, you are noting that gravitation is purely attractive and are wondering why that doesn't just pull everything together into a small blob of matter.
One reason is centrifugal force. Imagine two masses connected by a spring, spinning around like a bolo. The spring is trying to pull them together, but unless there is friction to slow down the spinning, centrifugal force will keep the two apart. They will just keep spinning around without getting closer to each other. Think of gravity as being the spring.
Another reason is conservation of energy. If masses fall toward each other, they move faster and faster as they fall. If they have the slightest sideways motion they will not collide and they'll fly past each other and continue until they are as far apart as they were in the beginning. If there are multiple masses it's more complicated, but the bottom line is that in order to concentrate some of the masses into tight orbits around a central point, it is necessary for another portion of the masses to be moved to very high orbits -- simply for conservation of energy.