The simplest answer is that if Company ABC's offer is an all cash offer and is a welcome offer by company xyz, who considers it fair and reasonable, then Company xyz will notify its shareholders that xyz management believes that they should accept the offer. Then it is up to the shareholders to vote on it. Then if approved by the shareholders of both companies the deal will go through at a particular closing date and the shareholders of xyz will tender their shares to ABC or its designated trustee and receive their cash payment.
Once the shares are received by ABC, they are retired.
However, there are many variables.
You should note also that if the deal looks promising the price of the stock will trade within pennies of the deal price and most shareholders that wish to sell will sell to the marketplace rather than wait to sell to the acquiring company. An institution will buy the shares all the shares and make a few cents profit.
There are also variables for all stock deals and part cash, part stock deals, hostile takeover attempts, poison pills, white knights, bidding wars, etc. So it can get complicated.
In ONCY's case an offer of $10 per share would be laughable to many of the long time holders on this board and more importantly would probably never get approved by management unless it were accompanied by a very long and lucrative personal service contract.