The Pythagorean theorem is used to calculate the length of the hypotenuse of a right triangle using the lengths of the other two sides. It states that the sum of the squares of the two legs equals the square of the hypotenuse. The distance formula calculates the distance between two points and involves taking the difference of the x-coordinates squared and the difference of the y-coordinates squared and adding those values together. It is used to find distances in applications like navigation and physics.