You absolutely need to learn Google.
There huge amount of information about primality and factorization.
Quote:
In my program the biggest number is the biggest number your device can understand.
Most languages can handle BigInt numbers (virtually infinite integers).
Quote:
My questions is. How is working PrimeQ
You only forgot to tell us the language you use. Using Google and reading documentation will probably give you many informations about this, faster than us and with much more details.