When the internal and rotation motion of galaxies is studies, a surprising thing is observed: there does not seem to be enough stuff there! All the matter we see in the Universe, mostly stars, does not add to to the mass implied from the motion of stars in galaxies and galaxies around each other.
The orbital period of the Sun around the Galaxy gives us a mean mass for the amount of material inside the Sun's orbit. But, a detailed plot of the orbital speed of the Galaxy as a function of radius reveals the distribution of mass within the Galaxy. The simplest type of rotation is wheel rotation shown below.
If the Milky Way for example were arranged as a single central mass with the stars in orbit around it, a graph of orbital speed against radial distance would be similar to the red dotted curve shown below labelled Keplerian orbits. The orbital speed would tend to decrease with distance in the same ways as the solar system's planetary speeds decrease with increasing distance from the Sun.
In fact the orbital speed of matter in the Milky Way plotted against distance follows the blue curve above, implying much more matter distributed throughout the galaxy than we can actually see in all the stars and gas. So, the rotation curve of the Galaxy indicates a great deal of mass, but there is no light out there. In other words, the halo of our Galaxy is filled with a mysterious dark matter of unknown composition and type.