Dogs have ears which have evolved to be self-cleaning. The skin grows outwards and carries debris towards the opening of the ear, like a conveyor belt.
The external ear canal is L-shaped with a vertical canal, then a horizontal canal, leading up to the ear drum (the membrane separating the delicate hearing and balance organs from the outside environment).