You test the numbers one by one. First you check if it's divisible by 2, and then try 3, 5, and 7, and try every prime number until you reach the square root of that number.
Examples (Wiktionary)
Mandarin
開方子
开方子
kāi fāng zi
to write out a traditional Chinese medicine prescription