how many triangles will be in a 13 by 13 square if diagonals are drawn

The fact that it is a 13 by 13 is irrelevant.

Draw your 2 diagonals and count the number of points you see. Label the points A, B, C, D, and E, where E is the intersection of the diagonals.

A triangle is formed by connecting any 3 points, unless the 3 points lie in a straight line
e.g. ABC will form a triangle
AED will form a triangle , but AEC will not

So it becomes the number of ways we can choose 3 of the 5 points, which is
C(5,3) = 5!/(3!2!) = 10
but that would include AEC and BED, which form a straight line,
so there are 10-2 or 8 triangles

You could use the above reasoning for any polygon