how the moons stay in orbit around jupiter ?

The same way our moon stays in orbit. Gravitational pull of the planet keeps bending the path of the moon into a near-circular orbit. The gravitational attraction force is strong enough to keep the moon in orbit, but not strong enough to make it spiral into the planet.

The same physics keeps the Earth in a stable orbit about the Sun.

The moons stay in orbit around Jupiter due to the gravitational force between them. Gravity is a force that attracts objects with mass towards each other. In the case of Jupiter's moons, the gravitational force between Jupiter and its moons keeps them in orbit.

To understand how this works, you need to know about Isaac Newton's law of universal gravitation. This law states that every object in the universe attracts every other object with a force that is directly proportional to the product of their masses and inversely proportional to the square of the distance between their centers.

In the case of Jupiter and its moons, Jupiter's immense mass creates a strong gravitational pull. This gravitational pull attracts the moons towards Jupiter, causing them to orbit around the planet.

The specific path of each moon's orbit depends on its velocity and the distance from Jupiter. If a moon has sufficient velocity, it can maintain a stable orbit by continuously falling towards Jupiter while also moving forward fast enough to avoid crashing into the planet. This balance of gravitational force and velocity allows the moons to stay in orbit around Jupiter.

In summary, the moons stay in orbit around Jupiter due to the gravitational force between them. This force, governed by Newton's law of universal gravitation, keeps the moons moving in a stable path around the planet.