Antibiotics or Antivirals
Inner ear infections clear up on their own, so doctors usually will not prescribe drugs to clear it up. The drug you take depends on the cause of your infection. Antibiotics are only effective against bacteria. They do not help ear infections caused by viruses.
Doctors often only prescribe antibiotics  if symptoms do not improve after three days, there is ear drainage, or there is a risk of complications. Children under two are often given antibiotics, especially if the infection affects both ears.
While antibiotics can help fight the bacteria behind your infection, they often do not make a significant difference to associated symptoms like pain. This is one of the reasons doctors are hesitant to prescribe them.