Protostar

A Protostar  is the earliest stage of a star’s evolution. They are very young stars (comparatively speaking, of course) and are still gathering up mass from their molecular cloud. They glow, not from fusion  as the star’s core, but rather from the heat created by the star’s contracting. Protostars are usually surrounded by clouds of nebulous dust, making them difficult to detect from other worlds. Seen from within the system, a protostar would glow a dull red, with most of its luminosity shining in the infrared spectrum  but, due to to the clouds of gas and dust which surround the star, this light is re-radiated at far lower spectrums as it passes through these clouds.

Evolution and Pre-Main Sequence Stars
At its earliest stage, the temperature of the protostar will be around 2000 to 3000 K.

However, protostars rotate rapidly, creating a magnetic field and in turn creates a strong protostellar wind. Protostars also eject jets of particles at high speeds from either end of their rotational axis. These two effects eventually clear away the excess dust and gas. These stars are now optically visible and are therefore classified as pre-main sequence stars. Pre-main sequence stars are further subdivided into T-Tauri stars  (if their mass is less than  2 M☉) and Herbig Ae/Be stars  (if their mass is between 2 M☉ and 8 M☉). These stars typically have the same temperature as main sequence stars  of a similar mass but are more luminous and are larger.

Protostars larger than 8 M☉ skip this stage, as they contract very quickly and, by the time the clouds of gas and dust have been cleared, the star is already in its main sequence.

By the time a protostar has formed, a flat disk of material surrounds the star, called a protoplanetary disk or a proplyd if it is externally illuminated and is undergoing photoevaporation. This disk slows down the rotation of the star and may even coalesce into planets and other solar system objects. The protostar itself has the same chemical composition as that of the adult star it will eventually become. When the temperature of the star’s core exceeds 15 million Kelvin, thermonuclear fusion begins to take place in the star’s core and the star becomes a main sequence star.

Protostars less massive than 0.08 M☉ never reach this temperature, and thus become brown dwarfs.

A star will stay in its protostar stage for around 40 Million years for a protostar of 1 M☉, 700 Million years for a protostar of 0.1 M☉, and around 3 Billion years for a protostar of 0.08 M☉, and will stay in its pre-main sequence stage for as short as 10 000 years (high mass) to over 100 Million years (low mass). Sun-type stars spend around 10 Million years in this stage.

Habitability
Unless a rogue planet enters the system of a protostar, it is highly unlikely that a protostar would have any planets orbiting it, as the star is simply too young. Pre-main sequence stars, however, are potentially as habitable as their main sequence equivalents.

Worldbuilding in Practice
"Sprawling across the Armstrong Sector is the awe-inspiring Nephele Nebula. Within it are dozens, possibly even hundreds of protostars and other infant stellar objects. Among the most notable of these protostars is OKE4-73a, first observed by the Okeanos 4 space probe: the fourth probe to investigate the Nephele Nebula." "OKE4-73a is a standard, low-mass protostar and is theorized to be between 45 and 65 million years old; roughly halfway through its life as a protostar. It would be completely unremarkable, were it not for the fact that it completely lacks a protoplanetary accretion disk. Also the molecular cloud which normally surrounds a protostar was almost completely absent. Astronomers were baffled until they discovered OKE4-73b, a Jovian gas giant, orbiting the protostar. The leading theory is that OKE4-73b was previously a rogue planet (possibly ejected from another system) which was subsequently captured by Oke4-73a. The planet likely gobbled up the accretion disk and collapsed the molecular cloud. As of yet, no moons have been detected around the planet, but their existence is certainly possible.""Although highly anomalous and incredibly interesting, any manned exploration of the OKE4-73 system is highly unlikely, due to the discouraging cost-profit ratio of the expedition."