This might be a stupid question, but... let's say a BVI company is loaning money to a company in Armenia (this is purely an example).
How does that work? Do you need to hire a lawyer in both countries?
The parties have to comply with their local laws.
In this particular example, you would need to make sure that the loan the Armenian company gets isn't inadvertently considered income (repayment terms are unreasonably generous) or a fraudulent loan. Not all jurisdictions have laws like that, though, so it might not even be a risk at all in Armenia.
It'd probably be sufficient for the BVI company to have a standard loan agreement drafted under BVI law and then the borrower asks a local lawyer in Armenia to have a quick look at it. The main points to consider are repayment terms (duration, interest), what happens in case of default, and purpose of the loan. For example, if a loan is too generous or there are no repercussions in case of a default, there is a risk it might be considered something other than a loan (gift, capital injection, et cetera).
What about the jurisdiction clause - is it necessary? Is it common for such agreements to have one?
The jurisdiction clause is about disputes arising from the agreement. In this example, because I have very little confidence in Armenian courts being effective, I'd go for BVI or a neutral place with effective courts or IDR (Independent Dispute Resolution) like England and Wales. That doesn't mean the financial terms of the agreement have to comply with the laws of England and Wales. It's just a choice of venue in case of a dispute.