How does dark matter relate to the expansion of the universe?
It's the Dark Energy.
The debate on Dark Matter began when Scientists tried to measure the masses of galaxies and found major discrepancies in the calculations. They also observed some irregularities in the orbits of objects around those galaxies. Newton Law of Gravitation suggests that the force of gravity weakens as the square of the distance, this means the further away you are, they weaker is the force of Gravity. This also means that the closer in the object is, the faster it moves around the center of mass. Take an example of the Solar systems the orbital period of all planets increase as we move out from mercury towards Neptune.
But on a much larger scale this is not the case. Scientist saw that in most of the galaxies objects located at the outskirts of the galaxies were almost moving with the same speed as the inner ones indicating that there is certain force acting on those objects. They believe that the force is due to some mysterious matter which they named Dark Matter.
Dark Matter covers 25% of the entire universe, the rest is observable matter which is only 5% and the mysterious Dark Energy. It is the Dark Energy that is responsible for the expansion of the Universe. Previously scientists believed that the universe at some point will stop expanding and will contract again into a singularity but recent observations predicted that the universe is continuously expanding due to a mysterious energy which they called the Dark Energy which covers almost 68% of the Universe. They are not yet sure what Dark Matter and Dark Energy really are.