Add a semicolon and substitute == for = and the code appears to work
mp = Table[{i, PrimeQ[2^i - 1]}, {i, 2, 1000}];
Select[mp, #[[2]] == True &][[All, 1]]
Next, factoring primes is easy. Can you reword that sentence to make you goal more understandable?
Factoring can be just simple trial division or it can use more advanced methods to try to do this faster. Some of those methods can lead into the subject of number theory which is usually beyond Algebra 2, but sometimes you can understand how to use the methods even if you couldn't discover such methods yourself.