A base is a proton acceptor.
Amines work as bases due to the electronegativity of the nitrogen atom. The lone pair in the nitrogen atom is filled in a 2p(z) orbital, in phenylamine, the p orbital sufficiently overlaps with the p orbitals in the phenyl ring, thus causing the electron density to be spread over a larger area, or delocalised, thus reducing the basicity of the nitrogen atom.
On the other hand, in ethylamine, the nitrogen atom cannot overlap with any other atom and so the electron density is concentrated around the atom, or it's localised, thus increasing the basicity as it's able to attract protons more easily.