Shares and a takeover

Apologies if this has been asked beforeā€¦ā€¦
There are rumours that a company I have shares in may be subject to a takeover. If that does happen what happens to the shares I hold and what is (usually) the impact.

You will receive an amount of cash or a number of shares in the purchasing/merging company per share you hold, or a combination of both. Depends on the terms of the deal.