The foci of an ellipse have the property that the sum of the two distances from any point on the ellipse to the foci is a constant.
Suppose the ellipse \(\displaystyle \frac{x^2}{a^2}+ \frac{y^2}{b^2}= 1\). Then the vertices are at (-a, 0), (a, 0), (0, -b), and (0, b). Assume that a> b so that the foci lie on the x-axis, between (-a, 0) and (a, 0). Call the foci (c, 0) and (-c, 0).
Look at the distances from the point (a, 0) to the foci. The distance from (a, 0) to (c, 0) is a- c. The distance from (a, 0) to (-c, 0) is a+ c. The sum of those two distances is 2a, of course.
Now look at the distances from the point (0, b) to the foci. The distance from (0, b) to (c, 0) is \(\displaystyle \sqrt{b^2+ c^2}\). The distance from (0, -b) to (c, 0) is \(\displaystyle \sqrt{b^2+ c^2}\). The sum of those two distances is \(\displaystyle 2\sqrt{b^2+ c^2}\).
Since those two sums must be the same, we must have \(\displaystyle 2\sqrt{b^2+ c^2}= 2a\). Cancelling the "2"s and squaring both sides, \(\displaystyle b^2+ c^2= a^2\) or \(\displaystyle c^2= a^2- b^2\).