Foreign funds come into a country when investors outside the country can make larger gains by investing in various assets in the country compared to the gains they can make by investing in assets in their own country.
For example, investors outside a country A would buy stock in A rather than in their own country if the industrial growth in A is expected to be very high and the price of stocks of companies located in A to rise a lot. Similarly, if banks in A give a higher rate of interest for deposits, foreign investors would prefer to invest their money in these deposits.
When inflation rises in a country, the primary financial institution in the country tries to reduce it by decreasing the money supply in the system. This is usually done by increasing interest rates; as that makes it more expensive for people to borrow money to buy products and also acts as an incentive for people to save money with their deposits yielding higher returns.
If interest rates of a country are substantially higher, foreign funds flow into debt instruments there would rise. Conversely, as economic growth is curtailed by high interest rates, there would be a decreased investment in stocks and other assets which are negatively affected by high interest rates.
Much of the flow of funds from one country to another comes in the form of foreign direct investment in a given country. Such investment can be more or less desireable, depending on a number of factors. One of these factors is inflation. In general, a country which is experiencing inflation will also receive less foreign direct investment and will have fewer foreign funds flowing in.
The reason for this is that foreign investment tends to flow to countries whose economies seem to be strong and whose currencies are likely to appreciate in value relative to other currencies. A country that has a high rate of inflation does not meet these criteria. If there is inflation in a country, money invested in that country will tend to lose value relative to other currencies. Foreign investors do not want this to happen to their investments and so they will not invest in that country.
In general, then, inflation in a country tends to diminish the flow of foreign funds into that country.