You first get the prime factorization. Then if there is a factor squared you put it outside the squareroot symbol and the remaining inside the squareroot.
Ex. [tex] \sqrt{24} = 2 \sqrt{6} [/tex]
Since the prime factorization of 24 is [tex] 2^{3} *3[/tex] So the only square in the prime factorization is 2^2
Ex. [tex] \sqrt{32} = 4 \sqrt{2} [/tex]
Since the prim factorization of 32 is equal to 2^5 so 2^4 is going to be 4^2 that is why 4 is not inside