Many living organisms exhibit complicated but highly organized collective behaviors. Unlike passive systems whose dynamics are driven by thermal energy, living organisms are often active systems, in which motilities of individuals put the system far away from equilibrium. Naturally living in soil, social bacteria Myxococcus xanthus exhibits a series of fascinating self-organizing behaviors throughout its developmental cycle, including swarming during vegetative growth, forming rippling waves during predation, and aggregating into fruiting bodies when starved. In this thesis, I use M. xanthus as a model system and explore the mechanical basis behind its motility and self-organization. My work emphasizes on the utilization of microscopy, image processing techniques and data-driven analysis in the examination of M. xanthus on different scales. We first study M. xanthus fruiting body formation based on the statistical physics of active populations. We show that the aggregation process in M. xanthus resembles the dynamics of a spinodal decomposition phase separation. Modeling M. xanthus as active brownian particles, we demonstrate that the phase separation can be understood in terms of cell density and the Peclet number that captures the cell motility regarding its speed and reversal frequency. M. xanthus cells actively take advantage of their cellular control of motility to drive large scale aggregation by promoting gliding speed and suppressing reversals to increase motility persistence. Then we characterize the rippling behavior of M. xanthus both on single cell motility level and on population level. We find tracking data of single cells during rippling lacks the evidence to support the cell motion synchronization hypothesis. Using two different image processing techniques, we are able to characterize low density rippling structures by estimating local cell density. We further examine the high density rippling wave structures using a 3D laser microscope. Finally, we study the force generation mechanism of two distinct motility systems in M. xanthus. We find that cells use these motility systems in coordination while in groups. These results not only provided further understandings of the scale of forces M. xanthus experiences and exerts, but also suggests that M. xanthus mainly utilizes gliding motility during group migration.