A protostar is a dense cloud of gas and dust in space that is in the early stage of stellar evolution. It is the precursor to a star and forms through the gravitational collapse of a molecular cloud. As a protostar gathers mass, it heats up and undergoes further contraction until it reaches the point of nuclear fusion, becoming a main-sequence star.