At the macro level, there are only two forces that cause objects to be attracted toward each other:
Objects in water or other fluids can be pushed up to the surface by buoyancy.
Magnetism
Objects float in space because there is no gravity to pull the objects down. While on earth there is gravity so it pulls the objects to the ground.
gravitational force is a basic force of nature, it presents everywhere and at all time. The gravitational force acts between any 2 masses in the universe and pulls them toward each other .It is the force that pulls objects toward earth.
Decreasing the distance between two objects will increase the force of gravity. Gravity is proportional to the mass of the two objects and inversely proportional to the square of the distance between them.