Answer:
Depending upon the mass gathered, the next process formation varies:
Nuclear fusion can kick in leading to formation of star. The nuclei fuse to together and energy is liberated in the form of light and heat.
If sufficient mass is not gathered to start nuclear fusion reaction, gaseous planet forms like Jupiter.
In third case, even though sufficient mass is present (twice the mass of Jupiter) still no fusion reaction starts. Such bodies are known as failed stars or brown dwarfs.