Whenever you purchase or sell shares of a company with a different currency than your account’s currency, the amount is converted in real-time at the respective exchange rate.
Hence, this exchange rate can affect your return positively as well as negatively.
Let’s assume your account is in GBP and the exchange rate GBP to USD is 1.30.
To purchase a 5 US dollar share, you will spend 3,85 GBP.
If the share price rises to 5,5 USD and the exchange rate is 1.5 USD for each 1 GBP.
To sell the same share at 5.5 USD you will receive 3.67 GBP.