By definition, dn/dt = - λ N ,
If you separate the variables which contain N and t, and then integrate w.r.t N and w.r.t t you get,
lnN = -λt + C (1),
To find the constant of integration, solve (1) by setting N(t = 0) = N0 . This gives a value of,
C = lnN0 ,
By then substituting the value for C into (1), and relying on the properties of logs and exponentials, the following steps occur,
lnN = -λt + lnN0 ,
ln(N/N0) = -λt,
N/N0 = e-λt ,
N = N0e-λt,