It shows up as Treasury stock, which is an equity account.
From the link:
On the balance sheet, treasury stock is listed under shareholders' equity as a negative number. The accounts may be called "Treasury stock" or "equity reduction".
If they hold it for more than a year it's long term
When a company use cash to buy back their own common stock, does it show up on the balance sheet as "short term investment" or "long term investment"?