A galaxy is a group of many stars, with gas, dust, and dark matter.[1][2][3][4] The name 'galaxy' is taken from the Greek word galaxia meaning milky, a reference to our own galaxy, the Milky Way.
Gravity holds galaxies together against the general expansion of the universe.[3] In effect, the expansion of the universe takes place between groups of galaxies, not inside those groups. Gravity holds the galaxy together. The same applies to groups and clusters of galaxies, such as our Local Group where the Milky Way is, and the Virgo Cluster, a collection of more than 1,000 (might even be 2,000) galaxies. The gravitation is produced by the matter and energy in a galaxy or group of galaxies. Everything in a galaxy moves around a centre of mass, which is also an effect of gravity.
There are various types of galaxies: elliptical, spiral and lenticular galaxies, which can all be with or without bars. There are also irregular galaxies.
All galaxies exist inside the universe. The observable Universe contains more than 2 trillion (1012) galaxies[5] and, overall, as many as an estimated 1×1024 stars[6][7] (more stars than all the grains of sand on planet Earth).[8]