There is lots and lots on the web about this. Why not just Google it?
It is rather extensive to show all the details,
Looking at fig. 3, we have
and
Squaring [1] gives us
or
Now use [2] to make a substitution:

or
On the other hand, [1] yields us
Square root of both sides:
or
Therefore, we multiply by 2 and get:

or
Finally, with

,
we get a formula for the side of the (n+1)st polygon in terms of that of the nth polygon:

is the side of the inscribed square , so we get:
Double the sides and get 8 sides:
Double it and get 16 sides:

.
In general,
Since the perimeter of the nth polygon is

, an
approximation to

is
or

, where we have n radicals.
This can be written in a better way as
For instance, if we use n=8 in the above formula, we get 3.14157294025
I believe Archimedes used up to a 96-sided polygon.
I hope this helps. Remember, Archimedes did not use trig as we know it.