Galaxy collisions and their influence on the dynamics and evolution of groups and clusters of galaxies