They can be settled by wars where whoever wins, gets what they want. But a common way to solve a conflict is a negotiation. Countries will negotiate until they both are happy with the result.
hope that helped!