How do the sun, stars and galaxies work together?
The sun is one of many stars that are apart of many galaxies of the universe all held together by gravity.
The sun is one of around 200 billion stars our galaxy, the Milky Way, which itself, is one of the billions of galaxies in our universe. A galaxy is a large system of stars, gas (mainly hydrogen), dust and debris, and dark matter. All of this orbits an accepted center, all held together by gravity.