Definition: The largest circle the will fit inside a polygon that touches every side

Try this
Adjust the regular polygon below by dragging any orange dot, or alter the number of sides. Note the behavior of the polygon's incircle.

The incircle of a regular polygon is the largest circle that will fit inside the polygon and touch each side
in just one place (see figure above) and so each of the sides is a
tangent to the incircle.
If the number of sides is 3, this is an
equilateral triangle and its incircle is exactly
the same as the one described in Incircle of a Triangle.

The inradius of a regular polygon is exactly the same as its apothem. The formulas below are the same as for the apothem.
Use the formula that uses the facts you are given to start.

Inradius given the length of a side

By definition, all sides of a regular polygon are equal in length. If you know the length of one of the sides, the inradius is given by the formula:

where r is the radius (circumradius) n is the number of sides cos is the cosine function calculated in degrees (see Trigonometry Overview)

Irregular Polygons

Irregular polygons are not thought of as having an incircle or even a center. If you were to draw a polygon at random, it is
unlikely that there is a circle that has every side as a tangent.
An exception is a 3-sided polygon (triangle). All triangles always have an incircle.
(See Incircle of a Triangle)

It can happen in reverse however. You can start with a circle and draw an irregular polygon around it as in the figure on the right.
This would be called a circumscribed polygon.

Some mathematicians consider the incircle to be the largest circle that will fit inside a polygon,
without the requirement that it touches all the sides.
Clearly, under this definition, it is always possible to draw such a circle.