There is nothing that requires you to give up your IRA when you leave the US. You can continue to maintain the account, and the balance will increase or decrease over time based on how you have the funds invested in the account.
What happens when you go to withdraw money from the account at retirement age will depend on where you are residing. The US establishes bilateral tax treaties with many countries.
When it does so, the starting point is the Treasury Department's Model Income Tax Convention. In this model convention, the partner country agrees to treat a traditional IRA as a "pension fund" and it is subject to tax as a pension fund in the country of residence (i.e. for tax purposes, it is treated like any standard pension in the country of residence), which generally means that distributions are taxable. Further, the partner country further agrees to an exception for Roth IRAs and agrees that distributions from Roth IRAs are tax exempt.
Note though that this model changes over time, not all US tax treaties are based on it, and not all countries have tax treaties with the US.
Example #1: Poland. The current tax treaty dates from the 1970s, and it does not include the provisions relating to Roth IRAs. There is a revised treaty based on a recent version of the model that does include language about Roth IRAs, but, despite being agreed in principle, has been pending ratification by congress since at least 2015.
Example #2: Netherlands. The current tax treaty dates from the mid-1990s with a revision in 2004. It predates the 1996 model convention and the revision in 2004 made an attempt to reconcile some of the differences between the treaty and the model. The result is very confusing to understand when it comes to Roth IRAs, and guidance from some US tax advisers in the Netherlands is that a Roth IRA is treated like an asset and subject to the Dutch "wealth tax" of 1.2% on assets (technically not a wealth tax but close enough for these purposes).
So, you will need to check the specifics of the tax treaty between where you reside and the United States. If there is no tax treaty, you should speak with a knowledgeable tax professional to give you guidance. Don't expect this to be cheap. Tax advisors with deep knowledge of two tax systems tend to target high net wealth individuals. So rough estimate is at least the cost of a good CPA (NOT a TurboTax / HR Block) doing your taxes in the US.
EDIT to touch briefly on what happens to the account before retirement:
How the IRA is treated before you reach retirement while residing in another country will also largely be subject to what is agreed in a relevant tax treaty.
If the partner country recognizes your IRA as a pension fund, growth in the account should be tax exempt, but, again, the specifics will depend on the relevant tax treaty.
Further, it may be possible to continue making contributions to it while residing outside the US. These contributions may even be tax exempt. However, it is difficult to do so in practice. In order to qualify to contribute to an IRA, you must meet the US requirements to do so. That is, your earned income must exceed the size of your contribution. When residing in another country, this means that your earned income must exceed the Foreign Earned Income Exclusion (FEIE) limit ($107,600 for 2020) by the amount you wish to contribute. Whether this is deductible or not on your US taxes depends on your modified AGI, which, unhelpfully, does NOT take the FEIE into account. So, if you're single and covered by a pension in your country of residence, the $107,600 earned income minimum for a contribution already places you above the $75,000 upper limit for deducting IRA contributions.