The identity we need to show that once we have one solution we have them all is the following:
Exercise: Use this identity and the solution x=1, y=2 to find five solutions of the equation.
The real question, though, is why such an identity is true. To start you along the route to figuring that out, here's a hint: can you factor the expression y2-3x2?
The hardest question of all is how to find the smallest solution. For N=3, that's easy, since we can just search. For larger N, it gets much more difficult. Try to find solutions for N=2, 5, 6, 11 (all easy to find by simple searching), 13, 18 (getting harder: searching will take a while), 19, 22, 31, 46 (all quite hard: searching probably won't work, so you probably won't be able to find the least solution unless you come up with a better method).