Machine learning (ML) has become a powerful tool for scientific research, and its effectiveness can be further enhanced by incorporating physical knowledge directly into the learning process. Physics-informed machine learning is a broad class of ML methods in which such knowledge is embedded in the choice of inputs, model architecture, or learning objective. In this talk, I will present examples of studying dark matter distribution in the Milky Way. I will show how dynamical equations can be incorporated into the learning objective through physics-informed neural networks, using the estimation of local dark matter density in galaxies as an example. Extensions of these methods can also address incomplete observations, such as dust obscuration in the Milky Way and the limited phase-space information available for dwarf galaxies. Together, these examples demonstrate how combining flexible ML models with physical symmetries, constraints, and dynamical equations enables data-driven studies of fundamental physics, from galaxies.