If I'm elsewhere and a contract has a clause stating that it is to be
governed by the laws of the state of New York, is this always
enforcable?
This is a routine provision in all manner of contracts and would generally be enforced if any party to the contract, or the subject matter of the contract, had anything to do with the law of the selected forum. It might be held unenforceable if no party to the contract nor the subject matter of the contract had any connection to New York State.
There are circumstances, however, where a consent to a forum, although not the choice of law provision, would be invalid. The Fair Debt Collection Practices Act requires suits by a debt collector to collect a debt from a consumer to be brought in a venue where the consumer resides. But, it isn't clear to me that this would apply in an international transaction.
There might be other exceptions that would apply in some peculiar set of facts, but we don't have enough facts to speculate on those possibilities. Almost all legal rules are context specific and are subject to exceptions in unusual situations.
Could I be placed in situations where I would have to choose between
violating local law or the contract?
This is exceedingly unlikely. New York, like most states, recognizes the doctrines of illegality and frustration of purpose and impossibility as defenses to failure to perform a contract.
Also, a contract that would mandate behavior that is illegal where the contract is performed that is not illegal in New York State, is hard to imagine. Without knowing anything about the context of the contract or its subject matter it is hard to speculate.
If a dispute does arise, would that mean I have to travel to NY just
to go to court?
Normally, you could hire a New York lawyer to represent you, filing an Answer, participating in discovery, and engaging in motion practice. But, ultimately, you would probably have to submit to a deposition in New York State, and would later have to go to New York State is the matter proceeded to trial. Sometimes, telephone testimony is permitted, but permission to do so would be unlikely to be granted to a defendant in a civil case in most circumstances, unless that defendant's testimony was on a minor and largely uncontroverted point.
In a case where one party is based in New York State and the other is based outside the United States, you could probably remove the case from state court to federal court, however, if more than $75,000 was at stake.