First of all, you'll solve it on paper.
After you understand how to solve it, you write a program for it.
There are infinitely many Diophantine equations, so writing a generic solver for all of them would be quite a task.
Probably it would involve solving all the kinds of groups and recognising which group a given equation falls into first.
Are you sure you need to be able to solve any given Diophantine equation and not just a subset of the whole problem domain?