Before I dig deep on the story of dark matter, let me elucidate how gravity affects the motion of stars in universe. Say a star is revolving around a galactic center where most of the visible matter is concentrated. At any point of time, there will be two force acting on the star. One is the gravitational pull of the galactic center which tries to pull the star towards itself and other will be the tangential force. Tangential force is basically because of the velocity of the star. The resultant force at any given time will keep the star in orbit. If the velocity was to increase, tangential force will increase and the star will fling off from its orbit.
In 1933, Swiss astrophysicist Fritz Zwicky looked up to Coma cluster galaxy and observed that the stars at the edge of the galaxy orbited at more or less the same speed as the stars near the galactic center. He calculated the mass of the illuminating matter and was perplexed to find out that the gravity effect of the visible galaxy was not sufficient to support for the rapid rotation rates and hence the mass must be hidden from view. He termed this unseen mass as dunkle Materie (Dark Matter).
Scientists have not yet directly observed this dark matter as dark matter does interact with ordinary matter, made up of neutron, proton and electron. It doesn't even interact with any form of electromagnetic spectrum. But scientists are compelled to believe its existence because of the gravitational affect it has on visible matter and light.
From Einstein theory on space time continuum, we can say that the more massive an object is, the more gravity it exhibits and the more space it warps and the more it can warp the path of a light beam. You know what else bends light, lens. Thus, this phenomenon of bending of light beam by gravity is known as gravitational lensing. By tracking the beam of light coming from multiple source of lights in the space, scientists have plotted a 3D map of the dark matter.
Scientists now believe that the dark matter was created at the moment of big bang and played a critical role in the formation of the stars and planets. Basically dark matter which doesn't react with ordinary matter acted like scaffolding upon which ordinary matter could attach itself. Scientists had long wondered why universe formed in a random pattern, now they know it is because of the gravitational pull of the dark matter.
There are many contesting ideas about what the dark matter could be. One of the most widely accepted hypothesis about dark matter is that it could be composed of weakly interacting massive particles (WIMPs). The others posit that dark matter effects could be explained by modifying the existing theory of gravity. They propose for multiple forms of gravity and propose that large scale gravity differ from the gravity that we are accustomed to.