When two galaxies start to approach, the tidal attraction forces deform their structures, creating sometimes particular forms, like filaments or tails. The merging between different galaxies does not bring their inner stars in a real collision, because of the enormous dimensions of the space between the stars.
At first, the tidal attraction just involves the external areas of the galaxies. If they are spiral galaxies, their arms start to lengthen, like to be uncoiled. A famous example is represented from the couple of galaxies NGC 4038-4039, called the antennas.
Continuing with the interaction, gas and stars in the galaxies are used to concentrate in the nucleus, creating a star and gas bar through the galactic centre. This would perfectly explain the birth phenomenon of the spiral barred galaxies.
In the event of close encounters between galaxies full of gas (spiral and irregolar ones), we observe then a strong increase in the formation of inner stars. In effect, gas is compressed towards the centre, creating dense clouds able to collapse, creating a great number of stars.