How is a red dwarf formed?
A red dwarf is formed by gravitational compression and heating of an interstellar gas cloud, just like any other star. The only difference is that there is less material involved.
Red dwarfs are defined as low-mass stars between 0.075 and 0.50 times the mass of the Sun. With this range of mass, the compressed gas cloud gets hot enough in the center to fuse hydrogen, but it's much cooler than the Sun's core. So the fusion reaction goes slowly, the star is relatively dim, and the surface stays cool enough to glow reddish rather than white hot like our Sun.
Red dwarfs may not be glamorous, but their slow, tortoise-like reaction means they will burn steadily for hundreds of billions, even trillions of years. Like the fabled tortoise who wins the race, the numerous red dwarfs in our galaxy (and presumably in other galaxies) will be going strong long after all the bigger and more brilliant stars are dead.
For more on red dwarfs, see here: