Coconut oil melts at body heat so I just smeared some on a tissue then wiped it around the inside of his ear. Dogs ear canals are L-shaped so I massaged the jaw etc to work it down there.
If it's for an infection I would do it morning and night and I would dry the ears inside and out with tissue if he went swimming etc. If you think it's a mild irritation then just every morning or something.
This is just personal experience and research btw, just what's worked for us