Stars continuously lose mass through stellar winds. The mechanism and intensity depend on the star type, driving everything from gentle solar winds to extreme mass loss in evolved giants.
The solar wind is driven by the hot corona. Thermal energy accelerates particles to escape velocity, carrying plasma into the heliosphere.