The Andromeda Galaxy is about 2.5 million light-years from the Milky Way. The two galaxies have so much mass that their mutual gravitational attraction is pulling them toward each other. They will have their first close encounter in about 4.5 to 5 billion years, with about a 90% chance of merging within 10 billion years.
There is little danger of individual stars colliding because the stars are so far apart from each other.
The Milky Way is about 100,000 light-years across and is estimated to contain between 100 and 400 billion stars. We don't know the exact number because interstellar dust blocks our view of portions of the galaxy, although astronomers can use infrared and radio observations to study regions that are hidden from visible light.
However, Andromeda, by comparison, is a beast, with an estimated trillion stars and a diameter of about 220,000 light-years. With so many stars, I think to myself that there must be life in there somewhere, and maybe a few civilizations. We will never know because the distances are so vast. Just finding extraterrestrial life in our own galaxy, or even in our own solar system, would be an amazing accomplishment.
Both galaxies are so massive, with such powerful gravitational attractions, that they have satellite dwarf galaxies orbiting them. In the picture, we can see Messier 32 above the Andromeda galactic plane, looking like a bright snowball, and Messier 110 below the galactic plane.

