Solve : $x^2-92 y^2=1$
I think the most common systematic way to solve this type of problem is using continued fractions. I'll reiterate @Quimey's suggestion to refer to Wikipedia for Pell's Equation and specifically the section "Fundamental solution via continued fractions" and the Lenstra paper cited there.
In this case as a periodic continued fraction $$ \sqrt{92} = [9;1,1,2,4,2,1,1,18,1,1,2\ldots] = 9+\cfrac{1}{1+\cfrac{1}{1+\cfrac{1}{2+\cfrac{1}{4+\cfrac{1}{2+\cdots}}}}} $$ and after 7 terms we get the approximation $\sqrt{92}\simeq 1151/120$ which gives the fundamental solution.
As for implementing an algorithm for finding the continued fraction for square roots, you should be able to find resources online with a search, but can start by taking a look at this question.
As for the programming part, I thought I'd put up some simple brute force Python just as an example.
# Start at (1, 1) because (1, 0) is a trivial solution
x, y = 1, 1
z = x**2 - 92*(y**2)
while z != 1:
if z > 1:
y += 1
else:
x += 1
z = x**2 - 92*(y**2)
print x, y
This outputs the first solution
1151 120
Of course, as a brute force solution this code won't get you very far if, for example, you replaced 92 with larger numbers (or even if you replaced it by 61, for that matter).