They are similar in the sense that they are transferring money from the company to shareholders, but that's about it. There is different tax treatment, yes, but that's because they are fundamentally different.
Dividends transfer money equally to all shareholders, but that also reduces the value of each share by the same amount, since it's cash out the door, which drops the value of the company. Shareholders are taxed on dividends at the capital gains tax rate.
A buyback returns the cash to shareholders who decide to sell. Other shareholders get a secondary benefit of now owning a slightly larger portion of the company since there are fewer shares outstanding. Shareholders only pay tax if they sell shares for a gain.
It that means when company buyback their stock, the stock price will definitely go up?
Not necessarily. It depends on the price that the company buys back the shares for and what the "opportunity cost" of that cash is - meaning what else could the company have done with the cash that would have been better?
Buybacks often happen in mature companies with undervalued stock prices and fewer opportunities for further investment. If a company has an intrinsic value of $10 a share but its stock is trading at $8 a share, then it can instantly get a 25% "return" by buying back stock. I use the term "return" loosely since the company does not actually profit from the buyback, but from the shareholder's perspective the company is worth more per share.