Cells in our body move in groups during development, wound healing, and tumor spreading. Bacterial cells also coordinate their motion to aggregate into biofilms, to feed cooperatively, and to form fruiting bodies. All these collective movements rely on physical mechanisms involving cell-generated propulsion forces and both mechanical and biochemical interactions between cells. In the first part of the talk, I will review how cell-cell interactions lead to the emergence of collective phenomena in migrating cell groups. These phenomena include internally-driven fluid-solid and wetting transitions, hydrodynamic instabilities, as well as the appearance of orientational order, spontaneous flows, and mechanical waves even in the absence of inertial effects. I will illustrate how the quest for understanding collective cell migration has stimulated the development of active-matter physics — a new branch of non-equilibrium soft-matter physics. In the second part of the talk, I will present our studies on colonies of the soil bacterium Myxococcus xanthus. When the elongated and motile bacterial cells are densely packed, they align with neighboring cells and form an active liquid crystal. I will show that topological defects of the nematic cell alignment lead to the formation of new layers of cells, which triggers the growth of fruiting bodies in the bacterial colony.