Stars form inside massive clouds of gas and dust. Under gravity, these clouds collapse and heat up until nuclear fusion ignites in the core.