Python 2, 46 bytes
This finds the remainder / modulus of the input integer n divided by every number from 2 up to n-1. If there is at least one number in this sequence that has no remainder, or results in 0, this means that the number is not prime. If every value in this sequence is non-zero, the value is prime.
def f(n):print(all([n%i for i in range(2,n)])) Example Runs
I ran this in IPython:
In [11]: def f(n):print(all([n%i for i in range(2,n)])) In [12]: f(2) True In [13]: f(4) False In [14]: f(7) True In [15]: f(15) False In [16]: f(13) True In [17]: f(19) True In [18]: f(20) False