To understand this topic we have to see the structures of both by taking simple examples.
CH3CONH2 – Amide and CH3CH2NH2 –Amine
here as it is clear in the upper structures, on case of amides, the nitrogen atom is joined with oxygen. being more electron attracting , the oxygen decreases the electron density on nitrogen atom.
on the other hand being electron releasing in nature the CH3CH2 ethyl group increase the electron density on NH2 thus making it more basic.