It depends how large. Determining if a number is prime can actually be quite difficult. If the number is not "too" large, then you can do the following:
Check if the number is divisible by each prime up to the square root of the number. If not, then the number is prime.