The IRS does not start contact with a phone call demanding money or threatening arrest. That call is almost certainly a scam. Paste any letter you also got for an instant read.
The IRS contacts you by mail first and gives you a notice number you can verify. A surprise call demanding payment, threatening arrest, deportation, or license loss, or pushing gift-card/wire payment is the classic impersonation scam.
Hang up. Don't pay or share SSN/bank details. If you're unsure you owe anything, check your account at IRS.gov (type it yourself) and call the IRS at a number from their official site. Report the call to TIGTA.
Generally only after mailing you notices first — and they never demand gift cards, threaten arrest, or refuse to let you appeal. A cold call with those traits is a scam.