To calculate this, we need the Molarity formula. This formula tell us that Molarity, which is a concentration unit, is equal to the number of moles divided by the volume. In this question we already have the Molarity and the Volume, so let's build our equation:
C = n/V (You can see Molarity with the letter "C" because it means concentration)
3 = n/1
n = 1 * 3
n = 3 moles of NaOH