The question cannot be answered in the way you phrased it. We don't know the countries involved, amounts involved, and what is the source of the money. I suggest you discuss it with a licensed tax professionals in the countries involved.
In general, most countries follow these rules (with deviations in details, and occasional exceptions):
- If the money is yours, you can transfer it as you wish as long as it remains yours.
- Some countries require reporting (but not paying taxes) on transfers of money between your accounts, either foreign or any.
- If the money is new income to you, you'll be taxed on it by the country(ies) that have jurisdiction over that income, regardless of where and how you choose to transfer the money.
- If there's a tax treaty between the countries involved, you may need to resolve conflicts, otherwise each country has its own rules with regards to double taxation and recognition of foreign tax liability. If multiple countries are involved you may end up being double taxed (pay taxes in multiple countries for the same income).
- Some countries require reporting, or even forbid, accounts their citizens/residents have in other countries.
- All countries will frown upon you moving money around in order to complicate the tracing and attributing of any potential tax liability (aka "money laundering") and would consider actions design to avoid tax liability as an act of crime. A lot of the reporting requirements are intended to prevent exactly that.
- Many countries have mutual disclosure agreements where they would disclose to each other what accounts and assets citizens of one have in the other.