A hyperbola is a locus of points \(A(x,y)\) whose difference of its distances from two fixed points \(F_1\) and \(F_2\) (called the foci, located at \((c,0)\) and \((-c,0)\) in the diagram) is constant (\(K\) in the diagram). The following diagram shows all possible locations of \(A\) in that locus. Try to adjust the values \(c\) and \(K\) and move the point \(A\) to see the locus.

If we set the foci at \(F_1(c,0)\) and \(F_2(-c,0)\), then the locus of \(A(x,y)\) can be defined by \[|AF_2| - |AF_1| = K\] To find what \(K\) means, we look at the special point \(A(a,0)\). In this case, \(|AF_1| = a-c\) and \(|AF_2| = a+c\), which means \(K = 2a\), the distance from the centre (midpoint of the foci) to the point on the focus axis. For general \(A(x,y)\), \[|AF_2| - |AF_1| = 2a \quad \Rightarrow \quad \sqrt{(x+c)^2 + y^2} + \sqrt{(x-c)^2 + y^2} = 2a.\] After some serious simplication, we get \[\dfrac{x^2}{a^2} - \dfrac{y^2}{c^2-a^2} = 1.\] Let \[b^2 = c^2 - a^2,\] then we have the standrd form of the equation of a hyperbola \[\dfrac{x^2}{a^2} - \dfrac{y^2}{b^2} = 1.\]