Gamma-ray observations of the Milky Way and star-forming galaxies provide a powerful tool for studying the acceleration and transport of energetic particles near a diverse variety of their sources and in the interstellar medium (ISM). Inefficient diffusion around cosmic ray (CR) acceleration sites suggested by pulsar TeV halos and in the vicinity of supernova remnants challenges the simplified scenario with homogeneous diffusion of CRs. The development of fundamental theories of magnetohydrodynamic (MHD) turbulence and the numerical tools for studying their interactions with CRs leads to a significant progress in our understanding on the acceleration and transport of CRs. Meanwhile, novel techniques and rich observational data bring us unprecedented informative maps of turbulent magnetic fields in the multi-phase and multi-scale ISM. In this talk, I will present a review on the recent findings in gamma-ray astronomy, theoretical and numerical developments on studying particle acceleration and transport, new techniques for mapping interstellar turbulent magnetic fields, and finally, their synergy toward a better understanding on the origin of CRs.