The most common cause of an earache is a middle ear infection. The ear drum and the space behind it are infected. These are treated with oral antibiotics. The pain should be significantly less after 3 days. If not, you should call your provider.
Your ear may hurt for other reasons. Sometimes it is the ear canal that is infected (“swimmers ear”). These are treated with ear drops. It may hurt because the throat next to the ear is painful. Sometimes it could be from a dental infection. There are a number of other causes.