Pressure is pivotal during the stellar formation process. In a collapsing molecular cloud, thermal pressure counteracts gravitational forces. When the gravitational force overcomes thermal pressure, the cloud can collapse to form a protostar. As the protostar contracts, the increasing thermal pressure eventually balances gravitational forces, leading to hydrostatic equilibrium, which is essential for the star's stability.