How are critical values for correlation coefficients (product moment correlation coefficient) calculated?

I have a fairly basic understanding of statistics. I've been learning about measuring correlation using product moment correlation coefficients (I think they're also called Pearson correlation coefficients). I was doing a simple one-tailed correlation hypothesis test and to check if the value of r is significant or not I had to find the critical value on a table given the number of trials (n) and the level of significance, 1% or 0.1 for example and rho = 0.
The table: I was curious as to how these numbers were calculated, so I looked it up and the answers mentioned t-distribution and lots of other things I hadn't heard of and did not understand. Is there a formula that given n and the significance level gives the critical value of r shown on the table or is it more complicated than that?

• Can you give a reference/link for the table? Oct 10 '21 at 17:23
• @kjetilbhalvorsen PDF link, page 37 Oct 10 '21 at 20:15