If the startup took on any debt, at the front of the line is a bank. Their 'note' usually gets paid first. $POOL -= $BANK
When people invested in the Series A, B, C, ... their stock came with a 'liquidation preference' (which can have a few variants, but the two most common are, the investor chooses if they want the liquidation preference or the common value, the investor gets their liquidation preference and the common value. Note that these numbers are in $dollars not in $shares, so if VC A puts in $1M dollars with a 2X liquidation preference they get back $2M dollars. $POOL -= $LIQUIDATION
Sometimes at the same level, or just behind the investors, are convertible note holders, who gave money or equipment in exchange for shares. They often have the choice of getting either their money back, or the shares. $POOL -= $NOTE.
At this point, if there is anything left in the pool it gets distributed to common shares.
A nice rule of thumb is that the most common liquidation preference is 2X (these days anyway) so if the price is < 2X the amount of money raised to date, the common stock will not have any money allocated to it.
And in those situations it makes no difference if your stock 100% vests on acquisition or not, it is still worth 0.