Are stars, planets and galaxies just floating around space? Why do they float?
Well...this is a difficult one!
In reality I would say that all the celestial bodies move around under the influence of the Gravitational Force in a kind of very complex and intricate ballet of orbits and curved trajectories.
I know that probably it seems confusing but let us look at it in a simple way.
Our planet moves in an elliptical orbit around a star, the Sun (their masses are responsible for the gravitational interaction that binds them).
The Sun is not at rest and it moves around inside the galaxy, the Milky Way, creating a kind of spiraling movement of all the planets while moving.
Our galaxy (as a cluster of stars each with its planet trailing around them) is rotating around its center and is collectively moving through sidereal space together and interacting with all the other galaxies around her.
All of this movement because of gravitational interaction!
Hope it is not too confusing.