Salesforce acquires Own for $1.9B it was valued at $3.3B in Series E 2021
calcalistech.com
calcalistech.com
And they buy the shares themselves. Then, when an investor comes in, they reevaluate the company, and the investor buys some portion of the shares for $1/each (just an example) valuing the company at $1M. This investor might have only bought 20% of the shares, i.e. 200,000 while the founders still hold their 800,000.
During future investments, the company might be interested to have a higher number of shares. So they can issue a share split, every 1 share becomes 10 shares and everyone's price-of-purchase (basis) is multiplied by 10 per share. So 1 share for $1 becomes 10 shares for $0.1/each or $1 total.
And so it goes, new investors come in, existing investors and founders sell some portion of shares to them and the valuation of the company is adjusted based on the new price.
Usually, some portion of the shares is also reserved for the employee share options program (ESOP). Where each employee who joins the company receives a number of options with a specified strike price. For example, an employee might receive 100 options with $5 strike price. Another employee who joined later, after several share splits even, might receive 100 options with $15 strike price.
The employees who decide to exercise their options and buy the actual shares, need to pay the strike price while the share price might be very different. So if an employee has $5 strike options, and the new valuation of the company is $50/share, the employee pays $5 and receives one share which he can right away sell for $50.
This is the gist of it. But there are other considerations, like investor contracts might have stipulations about preferred shares vs. common shares, and things like an agreed multiple. So an investor's share that he bought at $100 will also get sold for $200 even when the new valuation says a share is only worth $50. And the employees will split the remainder (if there is one) amongst themselves.
So, depending on how early you joined the company, your shares are either worthless (for newcomers) or maybe worth something if you're one of the early employees, and most probably worth a lot for the founders.
Then there is also the buying company who is interested in retaining some important people. And these people usually get more than just a salary, they might get promised payouts in the form of bonuses for the next four/five years of their employment in the new company. And the new company frequently also has an ESOP program they get to participate in—which works differently in publicly traded companies vs. private ones.