The Large Magellanic Cloud, together with its apparent neighbor and relative, the Small Magellanic Cloud, are conspicuous objects in the southern hemisphere, looking like separated pieces of the Milky Way for the naked eye. They were certainly known since the earliest times by the ancient southerners, but these people produced little documents which are still preserved. Both Magellanic Clouds are irregular dwarf galaxies orbiting our Milky Way galaxy, and thus are members of our Local Group of galaxies. The Large Magellanic Cloud, at its distance of 179,000 light years, was longly considered the nearest external galaxy, until in 1994, the Sagittarius Dwarf Elliptical Galaxy was discovered at only about 80,000 light years.
Galaxy groups stay together as groups, and are defined as groups, due to the gravitational interaction, i.e. dynamics, they impose on each other. Usually a group has two or three massive galaxies that dominate the dynamics of the group and a variety of smaller galaxies which more or less orbit the massive ones or are exchanged between them, or in some cases are flung out of the system altogether when they fly close to a massive galaxy. It is also possible that the massive one devours a dwarf galaxy that comes too close.
The above information was sourced from Wikipedia