Here is a line drawn on a grid. There are also four right triangles drawn.
These four triangles are all examples of slope triangles. The longest side of a slope triangle is on the line, one side is vertical, and another side is horizontal. The slope of the line is the quotient of the vertical length and the horizontal length of the slope triangle. This number is the same for all slope triangles for the same line because all slope triangles for the same line are similar.
In this example, the slope of the line is 32. Here is how the slope is calculated using the slope triangles: