A foreign transaction fee is charged at an ATM or bank in a country where your bank has no bank branches at.
Say your banks branches are all in the USA and they don't have any other banks out of the USA. You go to another country and use your debit card at ATM machines or a bank in the other country you'll be charged a foreign transaction fee.
If your bank has banks overseas then you won't be charged a foreign transaction fee.