Global investors will invest in countries🌎 that offer them the highest chance of making money 💷 (obviously!). Economies which are thriving are of course a better bet than those which aren't as more companies are selling goods and making profit 📈 to return to investors.
To invest in a country, investors must buy that country’s currency 💷, which increases its value as there's more demand for it (The more demand there is for something, the higher the price). When an economy is doing well the central bank 🏛will usually raise interest rates to combat inflation (this is when the price of goods rises due to demand and reduces the real value of money🗑).
This rise in interest rates drives further demand for the countries currency as more investors look to benefit by saving in the country 💰 .This means they will have to convert their funds to local currency to save.